activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Problems in publishing from AMQP-JMS Bridge
Date Tue, 03 Dec 2013 09:28:20 GMT
On 12/03/2013 05:41 AM, xbhanu wrote:
> Yes, But my point is that a similar AMQP message(a j.u.Date instance) sent by
> a java client written with the Messenger API (proton-j) are successfully
> interpreted by the AMQP Python/Perl client. Even sending a list or map from
> proton-j java client works so why does it not work from the
> qpid-amqp-1-0-client-jms client bridge?

If you send a MapMessage via the qpid-amqp-1-0-client-jms, I believe it 
will work even when receiver is a python program. The issue is with 
ObjectMessage. There isn't a direct equivalent to that in the 
MessengerAPI as it is a JMS construct and is defined to contain a 
serialized java object.

Now, it could certainly be argued that qpid-amqp-1-0-client-jms should 
do something less java specific for an ObjectMessage as well, which is 
perhaps your point. The difficulty is that ObjectMessage could contain 
any arbitrary java object (as long as it is serializable). Therefore it 
is not entirely trivial to map that to the AMQP typesystem.

For a Date object it could simply write in a single timestamp value. 
However for a more general, (e.g. perhaps application defined) object, 
it would need to recursively convert all serialized fields as well as 
possibly annotating any objects other than the primitives with their 
java type name (though this would not be that useful to receivers not 
written in java).

By all means raise a JIRA or ask this question on the qpid users list 
(users@qpid/apache.org). I do agree that it is something that is worth 
some discussion and at least a clearer statement of what to avoid in 
cross-language systems.


Mime
View raw message