summaryrefslogtreecommitdiff
path: root/qpid/cpp/include
Commit message (Collapse)AuthorAgeFilesLines
* QPID-7207: remove cpp and python subdirs from svn trunk, they have migrated ↵Robert Gemmell2016-07-0545-5288/+0
| | | | | | to their own git repositories git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1751566 13f79535-47bb-0310-9956-ffa450edef68
* QPID-7149: Fixed messaging client shutdown.Alan Conway2016-04-051-38/+0
| | | | | | | Fix previous commit that did not respect the plugin boundaries for messaging::shutdown. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1737887 13f79535-47bb-0310-9956-ffa450edef68
* QPID-7149: Active HA broker memory leakAlan Conway2016-04-051-0/+38
| | | | | | | | | | | | The leak was caused by the sys::Poller. When two pollers run in the same process and one is idles, PollerHandles accumulate on the idle poller threads and are never released. The HA broker uses the qpid::messaging API to get initial status from other brokers. The messaging API creates a separate Poller from the broker. The fix is to shut down the qpid::messaging poller as soon as initial status checks are complete so it does not interfere with the broker's Poller. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1737852 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6858: update swig type mapping to compile with both python 2 and 3Gordon Sim2015-12-021-15/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1717670 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6718: Small fixes to compile on slightly older versions of G++ and ↵Andrew Stitcher2015-09-032-2/+12
| | | | | | Visual Studio git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1701130 13f79535-47bb-0310-9956-ffa450edef68
* Doc fixes per QPID-6648.Stephen D. Huston2015-07-161-23/+23
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1691457 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6256: Improved handling of protocol version incompatibilitiesGordon Sim2015-06-171-0/+5
| | | | | | | | | | | | | | | | * 0-10 path no longer hans on open when connecting to a broker not supporting that version * the 'protocol' connection option now supports specifying multiple protocols to try in order (as a coma separated list) * the protocol defaults, i.e. the value assumed if the 'protocol' connection option is not specified, can now be set via the client config file (e.g. protocol-defaults=amqp1.0,amqp0-10) or an environment variable (e.g QPID_PROTOCOL_DEFAULTS=amqp1.0,amqp0-10) * if neither the connection option nor the defaults are specified all valid versions will be tried (currently amqp0-10, then amqp1.0 but this may change in a future version) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1686078 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4710: [AMQP 1.0] Support for transactions in qpid::messaging C++ client.Alan Conway2015-02-271-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the "transactional retire and settle immediately" option for transactions as specified in AMQP 1.0 in the qpid::messaging C++ client. NOTE: Transactions over AMQP 1.0 require proton 0.9 or greater. With older versions, attempting a transactions over AMQP 1.0 will raise a link-detached exception "Node not found: tx-transaction" 1. Added descriptor list to Variant with support in Encoder and PnData. Required to support transactions, need to be able to create described lists. Variant changes are source and binary compatible. A Variant now has a Variant::List of descripors which can be numeric or string. Nested descriptors are implemented by putting multiple descriptors in the list. Other minor changes: - Variant refactor: don't delete impl on every assignment. - Add Variant constructors that take a string encoding. (new constructors, not defaulted arguments, so the change is binary and source compatible.) - Growable buffer support for Encoder. - Printing described Variant prints descriptors in form @descriptor value 2. Added transaction support to AMQP 1.0 client code Added messaging/amqp/Transaction.h,cpp: transaction logic - communicate with coordinator, send declare/dischange messages. - add tx state info to transfers and acknowledgements. - Sync session after discharge. - A transactional session automatically acks any message retrieved by fetch/get to bring them into the transaction. This is consistent the 0-10 client. Minor fixes to existing client code: - Fix use of pn_drain API in C++ client to work with C++ and Java brokers. - Make amqp::Exception derive from qpid::Exception 3. Fixes to existing broker code: - Incoming.cpp fix: start async completion before processing message. - Delay accept of dischage message till commit is complete. - newSession - handle failover during session creation. 4. Added tests interop_tests.py: transaction tests that can run against an external broker, see comments. ha_tests.py: Enable transaction tests over AMQP 1.0. Minor test fixes: - brokertest.py don't set default logging if QPID_LOG env vars set. - brokertest.py Pass kwargs to broker() create function. - qpid-receive: capacity should never be larger than message count. - Accept user:pass as well as user/pass in Url. - brokertest.py: Always do a ready() check on all brokers. If proton < 0.9 is used, transaction tests will be skipped or will downgrade to the amqp0-10 protocol with a printed warning. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1662743 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6107: Python Swig wrapped bindings consistently fail with spout and drainAlan Conway2014-09-221-0/+1
| | | | | | Problem was a missing Py_INCREF in cpp/include/qpid/swig_python_typemaps.i git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1626887 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5975: HA extra/missing messages when running qpid-txtest2 in a loop ↵Alan Conway2014-08-282-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with failover. This is partly not-a-bug, there is a client error handling issue that has been corrected. qpid-txtest2 initializes a queue with messages at the start and drains the queues at the end. These operations are *not transactional*. Therefore duplicates are expected if there is a failover during initialization or draining. When duplicates were observed, there was indeed a failover at one of these times. Making these operations transactional is not enough to pass, now we see the test fail with "no messages to fetch". This is explained as follows: If there is a failover during a transaction, TransactionAborted is raised. The client assumes the transaction was rolled back and re-plays it. However, if the failover occurs at a critical point *after* the client has sent commit but *before* it has received a response, then the the client *does not know* whether the transaction was committed or rolled-back on the new primary. Re-playing in this case can duplicate the transaction. Each transaction moves messages from one queue to another so as long as transactions are atomic the total number of messages will not change. However, if transactions are duplicated, a transactional session may try to move more messages than exist on the queue, hence "no messages to fetch". For example if thread 1 moves N messages from q1 to q2, and thread 2 tries to move N+M messages back, then thread 2 will fail. This problem has been corrected as follows: C++ and python clients now raise the following exceptions: - TransactionAborted: The transaction has definitely been rolled back due to a connection failure before commit or a broker error (e.g. a store error) during commit. It can safely be replayed. - TransactionUnknown: The transaction outcome is unknown because the connection failed at the critical time. There's no simple automatic way to know what happened without examining the state of the broker queues. Unfortunately With this fix qpid-txtest2 is no longer useful test for TX failover because it regularly raises TransactionUnknown and there's not much we can do with that. A better test of TX atomicity with failover is to run a pair of qpid-send/qpid-receive with fail-over and verify that the number of enqueues/dequeues and message depth are a multiple of the transaction size. See the JIRA for such a test. (Note these test also sometimes raise TransactionUnknown but it doesn't matter since all we are checking is that messages go on and off the queues in multiple of the TX size.) ) Note: the original bug also reported seeing missing messages from qpid-txtest2. I don't have a good explanation for that but since the qpid-send/receive test shows that transactions are atomic I am going to let that go for now. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1621211 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix typo in swig_python_typemaps.Alan Conway2014-07-231-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1612858 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5882: fix authentication failure on 1.0 codepathGordon Sim2014-07-071-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1608578 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA - Fixed typo in a comment.Ted Ross2014-06-301-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1606929 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Error handling in swig_python_typemaps: don't core dump if ↵Alan Conway2014-06-261-8/+11
| | | | | | qpid.datatypes is not found. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1605920 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5828: more consistent behaviour os send() when disconnectedGordon Sim2014-06-251-0/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1605429 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5848: update reference doc for connection optionsGordon Sim2014-06-251-1/+32
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1605426 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5736: only block until sent message is settled; signal rejection by ↵Gordon Sim2014-04-301-0/+9
| | | | | | throwing exception git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1591300 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5696: Floats losing their fractional part.Darryl L. Pierce2014-04-141-1/+1
| | | | | | | This is due to doubles be cast as floats when passed into the Variant type causing the loss of value. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1587267 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5560: HA tests do not use AMQP 1.0Alan Conway2014-04-073-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HA tests were using only AMQP 0-10. Modified the tests to use AMQP 1.0 if available (still use 0-10 if 1.0 is not available) Fixed bugs uncovered both in the tests and in the AMQP 1.0 implementation. Summary of changes: - brokertest.py: configurable support for of swig vs. native and amqp0-10 vs. 1.0 - default to swig+amqp1.0 if swig is available, native+amqp0-10 otherwise - qpidtoollibs/broker.py: enable use of swig client with BrokerAgent - Swig python client: - support for passing client_properties/properties. - expose AddressHelper pn_data read/write as PnData helper class - set sender/receiver capacity on creation - limited disposition support - rejected messages. - support for additional timeout parameters - expose messaging::Logger, allow log configuration to be set from python. - ha_tests.py: - bind, delete policies not supported by AMQP 1.0, switched to using BrokerAgent QMF. - pass protocol:amqp1.0 connection-option to c++ test clients (qpid-send, qpid-receive) - TX tests forsce use of 0-10 protocol (but still with Swig client if enabled.) - Broker fixes: - Queue::Settings::isTemporary was set in the 0-10 SessionAdapter, moved to Broker::createQueue. - broker::amqp::Session was always setting an exclusive owner in createQueue git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1585588 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5586: Introduce SessionClosed exceptionAndrew Stitcher2014-03-191-0/+10
| | | | | | | - use it for qpid::messaging::Session::nextReceiver to ensure that closing a connection/session can be distinguished. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1579367 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5499: Fix Ruby/Perl bindings when built with -Werror=format-securityDarryl L. Pierce2014-02-072-2/+2
| | | | | | Changed the swig descriptors so that they use a constant format string. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1565651 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5415: Fixes to correct API specification and exportsAndrew Stitcher2014-01-031-1/+1
| | | | | | | - Correctly export LoggerOutput virtual destructor for Visual Studio - Add new APIs into the API specification git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1555245 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5415: Implement control of internal log output in qpid::messaging APIAndrew Stitcher2014-01-031-0/+165
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1555202 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Rename Message_ostream.h/.cpp to Message_io.h/.cpp.Alan Conway2013-12-201-3/+3
| | | | | | Allow for addition of istream operator in future. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1552780 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Added ostream operator for qpid::Messaging::MessageAlan Conway2013-12-201-0/+34
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1552476 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5369: Issue compile-time error if deprecated QMF Agent or Console API ↵Kenneth Anthony Giusti2013-11-2518-0/+86
| | | | | | used by applications git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1545368 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: Include file moved to correct placeAndrew Stitcher2013-10-291-106/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1536903 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4730: Losing object references in Perl.Darryl L. Pierce2013-10-041-4/+8
| | | | | | Contributed by Hao Chang Yu <hyu@redhat.com> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1529269 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2926: Better solution for instantiating qpid::messaging::Handle<> ↵Andrew Stitcher2013-09-231-4/+5
| | | | | | specialisations git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1525706 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4932: expose reconnect&replay logic for application to control itselfGordon Sim2013-09-061-0/+27
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1520673 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5104: fix for python 2.4Gordon Sim2013-09-061-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1520552 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5104: make handling of properties in swigged impl match the pure python ↵Gordon Sim2013-09-052-1/+10
| | | | | | impl more closely git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1520416 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5079: Remove unused and unecessary member of MessagingException classAndrew Stitcher2013-08-221-3/+0
| | | | | | - Potentially an ABI change but noone can really have used this for anything. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1516551 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5079: Get library import/export declarations working for linuxAndrew Stitcher2013-08-221-4/+8
| | | | | | - Only qpidmessaging and qpidtypes libraries are affected git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1516549 13f79535-47bb-0310-9956-ffa450edef68
* Revert "QPID-5067: Changed language bindings to use UTF-8 encoding on strings."Darryl L. Pierce2013-08-143-19/+8
| | | | | | This reverts commit e9abca572cf1845bd3ad25238e3edbeef10e61a6. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1513818 13f79535-47bb-0310-9956-ffa450edef68
* Revert "QPID-5067: Fixed an unmatched closing parenthesis."Darryl L. Pierce2013-08-141-1/+1
| | | | | | This reverts commit 87a60f02cfe49d99fda6d867108c3c7c6d1ad122. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1513817 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5040: further fix for windows buildGordon Sim2013-08-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1513624 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5040: support for sending and receiving messages with AmqpValue sectionsGordon Sim2013-08-131-0/+22
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1513536 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5067: Fixed an unmatched closing parenthesis.Darryl L. Pierce2013-08-121-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1513256 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5067: Changed language bindings to use UTF-8 encoding on strings.Darryl L. Pierce2013-08-093-8/+19
| | | | | | | Now, by default, all strings will come out of the dynamic languages and be encoded using UTF-8. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1512482 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5051: fixes for swig test failures on RHEL5 (and the failure to detect ↵Gordon Sim2013-08-071-1/+2
| | | | | | them) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1511483 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Corrected use of boost_hash, failing to build on some compilers.Alan Conway2013-08-051-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1510597 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: HA TX transactions, blocking wait for prepareAlan Conway2013-08-011-0/+1
| | | | | | | | | | | Backups send prepare messages to primary, primary delays completion of prepare till all are prepared (or there is a failure). This is NOT the production solution - blocking could cause a deadlock. We need to introduce asynchronous completion of prepare without blocking. This interim solution allows testing on other aspects of TX support. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1509424 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: HA TX transactions: basic replication.Alan Conway2013-08-011-0/+106
| | | | | | | | | | | | | | | On primary a PrimaryTxObserver observes a transaction's TxBuffer and generates transaction events on a tx-replication-queue. On the backup a TxReplicator receives the events and constructs a TxBuffer equivalent to the one in the primary. Unfinished: - Primary does not wait for backups to prepare() before committing. - All connected backups are assumed to be in the transaction, there are race conditions around brokers joining/leavinv where this assumption is invalid. - Need more tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1509423 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4942: Include file not part of supported APIAndrew Stitcher2013-07-311-91/+0
| | | | | | (missed out from earlier commit) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1508915 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4942: Only install include files that are used by the supported APIAndrew Stitcher2013-07-2676-7654/+0
| | | | | | | - Since we removed a whole lot of old API code we can drastically cut down on the header files that we export. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1507469 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4940: Remove qmf1 console codeAndrew Stitcher2013-07-2613-1336/+0
| | | | | | QPID-4941: Remove qmf1 console examples git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1507467 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4940: Remove obsolete qmf codeAndrew Stitcher2013-07-2616-1825/+0
| | | | | | | | | - Remove qmf1 engine code - Remove qmf1 language bindings - Remove qmf1 agent code (it depends on engine) - Fix up cmake to build git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1507464 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: tweak code to allow better lock analysis by CoverityKenneth Anthony Giusti2013-07-021-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1498926 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: fixed two minor typos in doxygenGordon Sim2013-06-251-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1496467 13f79535-47bb-0310-9956-ffa450edef68