-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6816/
-----------------------------------------------------------
(Updated Sept. 28, 2012, 5:15 p.m.)
Review request for qpid, Gordon Sim, Robbie Gemmell, Weston Price, and Keith
Wall.
Changes
-------
Made the following changes.
1. Switched the default encoding to legacy format.
2. It now allows elements of different types.
3. Added several unit tests in favour of a system test.
Description
-------
We have a need to support amqp encoded list messages that are understood across
all language clients. In JMS this is a bit difficult as there is no direct list
message interface like the map message.
I wanted to introduce a way of getting list message support while using only
JMS interfaces.
The list message support is implemented as a special case of Map message, where
the only entry is a list (it can be nested lists as well).
The application notifies the client of their intention via a message header.
MapMessage m = _session.createMapMessage();
m.setBooleanProperty("encode-as-list", true);
m.setObject("amqp/list", myList);
_producer.send(m);
The resulting message body will be encoded as an AMQP 0-10 list. A C++ or
python client can then directly read it as a list message.
On the receiving side, it will be presented as a MapMessage with a single entry
retrieved using "amqp/list".
List list = (List)m.getObject("amqp/list");
Please feel free to provide feedback, including alternative ways of
implementing this.
All feedback are most welcomed!
This addresses bug QPID-3906.
https://issues.apache.org/jira/browse/QPID-3906
Diffs (updated)
-----
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedListMessage.java
PRE-CREATION
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedListMessageFactory.java
PRE-CREATION
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/message/MessageFactoryRegistry.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionURL.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/ListMessage.java
PRE-CREATION
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/Session.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/client/AMQConnectionUnitTest.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_10Test.java
1391510
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java
1391510
Diff: https://reviews.apache.org/r/6816/diff/
Testing
-------
AMQPEncodedListMessageTest is added to cover several cases.
Thanks,
rajith attapattu