qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robbie Gemmell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPIDJMS-89) MapMessages that are not annotated as such, are handled as ObjectMessages by the consumer instead
Date Thu, 23 Jul 2015 21:27:05 GMT

    [ https://issues.apache.org/jira/browse/QPIDJMS-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14639535#comment-14639535

Robbie Gemmell commented on QPIDJMS-89:

Hi Alex,

This isn't actually a bug but instead acting as intended, in keeping with the current state
of the AMQP JMS Mapping (which the client implements) work underway at OASIS. The reason this
approach was taken is that there is no way to tell without deep inspection what is in the
map and so similarly whether its contents would actually be consumable via the JMS API (JMS
maps are far more restrictive in their allowed contents than AMQP maps are). The old client
was originally a prototype and simply ignored that fact.

The idea of doing it this way was also a bit forward-looking towards supporting JMS 2.0 and
its support of the 'getBody()' method, with that rendering the MapMessage vs ObjectMessage
distinction less interesting since you could just grab the underlying map the same from either
without knowing what type of message it is. Something I had thought of was adding an optional
configuration to let users decide that all maps should be MapMessages, if they prefer that
and know it will be the case that the contents are 'JMS safe', but that isn't something we
have got to doing yet.

I'm going away for a bit, so I probably won't see any replies until mid next week.


> MapMessages that are not annotated as such, are handled as ObjectMessages by the consumer
> -------------------------------------------------------------------------------------------------
>                 Key: QPIDJMS-89
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-89
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>    Affects Versions: 0.2.0, 0.3.0
>            Reporter: Alex Plischke
>              Labels: qpidclient
>         Attachments: 0001-QPIDJMS-89-Handle-unannoted-MapMessages-during-consu.patch
> If the annotation type "x-opt-jms-msg-type" is missing from the message (e.g. the message
was created by the old qpid amqp 1.0 client) and this message is supposed to be a MapMessage,
then the consumer will create an ObjectMessage instead.
> This is due to AmqpJmsMessageBuilder.createWithoutAnnotation() not handling the MapMessage
case, which ends up creating an ObjectMessage instead.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message