Bug 1015448 - AMQP 1.0 qpid::messaging c++ local transactional support to be enabled (Transactions not yet supported)
Summary: AMQP 1.0 qpid::messaging c++ local transactional support to be enabled (Trans...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: 3.2
: ---
Assignee: Alan Conway
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On:
Blocks: 785156
TreeView+ depends on / blocked
 
Reported: 2013-10-04 09:38 UTC by Frantisek Reznicek
Modified: 2015-10-08 13:08 UTC (History)
9 users (show)

Fixed In Version: qpid-cpp-0.32-1
Doc Type: Enhancement
Doc Text:
Local transactional support is now available for the AMQP 1.0 qpid::messaging c++ client. This feature was available with the AMQP 0-10 protocol, but was missing as a feature of the AMQP 1.0 protocol. Any customer who attempted to use the feature with the old protocol, and tried to upgrade, would have encountered a `Transactions not yet supported` error. Transactional support in AMQP 1.0 works as it did in AMQP 0-10, and customers can now continue to use the same approach in the latest version of AMQP.
Clone Of:
Environment:
Last Closed: 2015-10-08 13:08:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-4710 0 None None None Never
Apache JIRA QPID-6183 0 None None None Never
Red Hat Product Errata RHEA-2015:1879 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.2 Release 2015-10-08 17:07:53 UTC

Description Frantisek Reznicek 2013-10-04 09:38:02 UTC
Description of problem:

AMQP 1.0 qpid::messaging c++ local transactional support to be enabled (Transactions not yet supported)

As of now pid::messaging c++ qpid clients does not support local transactions.
Local transactional support was identified as P1-A (highest) priority for 3.0 EA.

As of qpid-cpp-*0.22-18.el6 + qpid-proton-*0.5-6.el6 clients are reporting the functionality is not supported yet:
  Transactions not yet supported

It looks that transactional support is blocked at middle software layer, please enable local transactional support.

Version-Release number of selected component (if applicable):
# rpm -qa | grep qpid | sort
perl-qpid-0.22-5.el6.i686
perl-qpid-debuginfo-0.22-5.el6.i686
python-qpid-0.22-5.el6.noarch
python-qpid-proton-0.5-6.el6.i686
python-qpid-proton-doc-0.4-2.2.el6.i686
python-qpid-qmf-0.22-14.el6.i686
qpid-cpp-client-0.22-18.el6.i686
qpid-cpp-client-devel-0.22-18.el6.i686
qpid-cpp-client-devel-docs-0.22-18.el6.noarch
qpid-cpp-client-rdma-0.22-18.el6.i686
qpid-cpp-client-ssl-0.22-18.el6.i686
qpid-cpp-debuginfo-0.22-18.el6.i686
qpid-cpp-server-0.22-18.el6.i686
qpid-cpp-server-devel-0.22-18.el6.i686
qpid-cpp-server-ha-0.22-18.el6.i686
qpid-cpp-server-rdma-0.22-18.el6.i686
qpid-cpp-server-ssl-0.22-18.el6.i686
qpid-cpp-server-store-0.22-18.el6.i686
qpid-cpp-server-xml-0.22-18.el6.i686
qpid-cpp-tar-0.22-18.el6.noarch
qpid-java-client-0.22-5.el6.noarch
qpid-java-common-0.22-5.el6.noarch
qpid-java-example-0.22-5.el6.noarch
qpid-jca-0.18-8.el6.noarch
qpid-jca-xarecovery-0.18-8.el6.noarch
qpid-jca-zip-0.18-8.el6.noarch
qpid-proton-c-0.5-6.el6.i686
qpid-proton-c-devel-0.5-6.el6.i686
qpid-proton-c-devel-doc-0.5-6.el6.noarch
qpid-proton-debuginfo-0.5-6.el6.i686
qpid-qmf-0.22-14.el6.i686
qpid-qmf-debuginfo-0.22-14.el6.i686
qpid-qmf-devel-0.22-14.el6.i686
qpid-snmpd-1.0.0-12.el6.i686
qpid-snmpd-debuginfo-1.0.0-12.el6.i686
qpid-tests-0.22-5.el6.noarch
qpid-tools-0.22-5.el6.noarch
rh-qpid-cpp-tests-0.22-18.el6.i686
ruby-qpid-qmf-0.22-14.el6.i686


How reproducible:
100%

Steps to Reproduce:
1. Use transactional session calls:
   session = connection.createTransactionalSession();
   ...
   session.commit(); / session.rollback();
2. client does not allow those and ends with
   Transactions not yet supported

Actual results:
  Local transactional support not available.

Expected results:
  Local transactional support should be available for 3.0 EA.

Additional info (transcript):
./dtests.py --dschema DS1QbrkNoauth --execute-tests-by-name TransactionAmqp10CppTests --test-node $(hostname) &> 131004tx_1.log
tailf 131004tx_1.log | grep ...
...
[05:12:28] 
ERROR:mrg-qe-0*:'  /var/dtests/node_data/clients/cli_wrapper.sh  /var/dtests/node_data/clients/qc2_spout  --log-msg-body --broker mrg-qe-0*:5672 --connection-options "{  protocol : 'amqp1.0' }" --count 1000 --content "tR5L...b7JuF3nQvWDhCM6ISGJzGkR"  'test_a1_c1_msH_md0_trsH_commit_commit_00; {create: always, node:{durable: False}}' --tx-batch-size 100 --tx-action commit', ecode:1 (exp. True), dur.:2.27 err_cnt:1
[05:12:28] DEBUG:stdout:
  Transactions not yet supported
[05:12:28] DEBUG:stderr:
...

Clients:
http://ooo.englab.brq.redhat.com/c/dtests/tree/dtests/node_data/clients/qc2_spout.cpp
http://ooo.englab.brq.redhat.com/c/dtests/tree/dtests/node_data/clients/qc2_drain.cpp

Comment 4 Alan Conway 2014-12-10 17:33:06 UTC
Qpid C++ client and broker work is complete.

Waiting for blocking issues to be closed before final test and close of this issue.

See https://issues.apache.org/jira/browse/QPID-4710

Comment 6 Alan Conway 2015-03-01 13:17:27 UTC
Fix committed to upstream trunk Works with current proton 0.9 master.

==== https://svn.apache.org/viewvc?view=revision&revision=1662743

QPID-4710: [AMQP 1.0] Support for transactions in qpid::messaging C++ client.

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.

Comment 13 Frantisek Reznicek 2015-07-23 10:37:05 UTC
The feature has been implemented and works the same way as AMQP 0-10. Tested on RHEL 6.7 i/x and 7.1x on packages:

# rpm -qa | grep qpid | sort
python-qpid-0.34-1.el6.noarch
python-qpid-qmf-0.34-1.el6.x86_64
qpid-cpp-client-0.34-1.el6.x86_64
qpid-cpp-client-devel-0.34-1.el6.x86_64
qpid-cpp-client-devel-docs-0.34-1.el6.noarch
qpid-cpp-client-rdma-0.34-1.el6.x86_64
qpid-cpp-debuginfo-0.34-1.el6.x86_64
qpid-cpp-server-0.34-1.el6.x86_64
qpid-cpp-server-devel-0.34-1.el6.x86_64
qpid-cpp-server-ha-0.34-1.el6.x86_64
qpid-cpp-server-linearstore-0.34-1.el6.x86_64
qpid-cpp-server-rdma-0.34-1.el6.x86_64
qpid-cpp-server-xml-0.34-1.el6.x86_64
qpid-java-client-0.32-2.el6.noarch
qpid-java-common-0.32-2.el6.noarch
qpid-java-example-0.32-2.el6.noarch
qpid-jca-0.22-2.el6.noarch
qpid-jca-xarecovery-0.22-2.el6.noarch
qpid-jms-client-0.2.0-2.el6.noarch
qpid-jms-client-docs-0.2.0-2.el6.noarch
qpid-jms-client-examples-0.2.0-2.el6.noarch
qpid-jms-client-maven-repo-0.2.0-2.el6.noarch
qpid-proton-c-0.9-4.el6.x86_64
qpid-proton-c-devel-0.9-4.el6.x86_64
qpid-proton-debuginfo-0.9-4.el6.x86_64
qpid-proton-java-0.9.1-2.el6.noarch
qpid-proton-java-maven-repo-0.9.1-2.el6.noarch
qpid-qmf-0.34-1.el6.x86_64
qpid-qmf-debuginfo-0.34-1.el6.x86_64
qpid-qmf-devel-0.34-1.el6.x86_64
qpid-tools-0.34-1.el6.noarch

-> VERIFIED

There might be coming defects around some transactions specifics (hanging client it it is proved to not be test issue)

Comment 15 errata-xmlrpc 2015-10-08 13:08:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-1879.html


Note You need to log in before you can comment on or make changes to this bug.