<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/qpid-python.git/cpp/include/qpid/messaging, branch QPID-6125-ProtocolRefactoring</title>
<subtitle>git.apache.org: qpid.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/'/>
<entry>
<title>QPID-5975: HA extra/missing messages when running qpid-txtest2 in a loop with failover.</title>
<updated>2014-08-28T21:47:44+00:00</updated>
<author>
<name>Alan Conway</name>
<email>aconway@apache.org</email>
</author>
<published>2014-08-28T21:47:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=b93b20dd123757b208f9e78ef778e3648c3438a0'/>
<id>b93b20dd123757b208f9e78ef778e3648c3438a0</id>
<content type='text'>
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/qpid@1621211 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/qpid@1621211 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5882: fix authentication failure on 1.0 codepath</title>
<updated>2014-07-07T19:44:42+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2014-07-07T19:44:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=2f97912d86184ebe0db8aced67174d6be2c46f9d'/>
<id>2f97912d86184ebe0db8aced67174d6be2c46f9d</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1608578 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1608578 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>NO-JIRA - Fixed typo in a comment.</title>
<updated>2014-06-30T20:54:54+00:00</updated>
<author>
<name>Ted Ross</name>
<email>tross@apache.org</email>
</author>
<published>2014-06-30T20:54:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=9d989c9e56afc3d92af80ae6c9cb5577d1db233c'/>
<id>9d989c9e56afc3d92af80ae6c9cb5577d1db233c</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1606929 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1606929 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5828: more consistent behaviour os send() when disconnected</title>
<updated>2014-06-25T14:47:51+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2014-06-25T14:47:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=e37e75591dd1416888301294e4ca83cd940e42c0'/>
<id>e37e75591dd1416888301294e4ca83cd940e42c0</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1605429 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1605429 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5848: update reference doc for connection options</title>
<updated>2014-06-25T14:41:57+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2014-06-25T14:41:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=7e11b6cf044afee27ee82ae2393a8284e644c8f1'/>
<id>7e11b6cf044afee27ee82ae2393a8284e644c8f1</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1605426 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1605426 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5736: only block until sent message is settled; signal rejection by throwing exception</title>
<updated>2014-04-30T14:10:00+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2014-04-30T14:10:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=5032e8229af322a750f854ecbd8653de29acb999'/>
<id>5032e8229af322a750f854ecbd8653de29acb999</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1591300 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1591300 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5560: HA tests do not use AMQP 1.0</title>
<updated>2014-04-07T21:22:55+00:00</updated>
<author>
<name>Alan Conway</name>
<email>aconway@apache.org</email>
</author>
<published>2014-04-07T21:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=4e30a9a1a663bcb2a3a22b02f0c1d9eee434fc4c'/>
<id>4e30a9a1a663bcb2a3a22b02f0c1d9eee434fc4c</id>
<content type='text'>
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/qpid@1585588 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/qpid@1585588 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5586: Introduce SessionClosed exception</title>
<updated>2014-03-19T19:40:40+00:00</updated>
<author>
<name>Andrew Stitcher</name>
<email>astitcher@apache.org</email>
</author>
<published>2014-03-19T19:40:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=4a48ce6fb6c4c0c48bfd8a739a9a058e130b705f'/>
<id>4a48ce6fb6c4c0c48bfd8a739a9a058e130b705f</id>
<content type='text'>
- 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/qpid@1579367 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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/qpid@1579367 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5415: Fixes to correct API specification and exports</title>
<updated>2014-01-03T20:25:56+00:00</updated>
<author>
<name>Andrew Stitcher</name>
<email>astitcher@apache.org</email>
</author>
<published>2014-01-03T20:25:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=f5a77ebc89eda291f67cfa886a374474b614b8b7'/>
<id>f5a77ebc89eda291f67cfa886a374474b614b8b7</id>
<content type='text'>
- 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/qpid@1555245 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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/qpid@1555245 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-5415: Implement control of internal log output in qpid::messaging API</title>
<updated>2014-01-03T18:54:46+00:00</updated>
<author>
<name>Andrew Stitcher</name>
<email>astitcher@apache.org</email>
</author>
<published>2014-01-03T18:54:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=87626cb7c371957e485ddef2e944adddf9c58637'/>
<id>87626cb7c371957e485ddef2e944adddf9c58637</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1555202 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1555202 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
</feed>
