[ 
https://issues.apache.org/activemq/browse/AMQ-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41192#action_41192
 ] 

Jeff Ward commented on AMQ-1567:
--------------------------------

By default, I would use the transformation that's specified on the message if 
the stomp subscription hasn't specified one.  For example, if a stomp message 
comes in with the transformation "jms-map-json" than the map should be 
translated back to json.  If it comes in with "jms-map-xml" than it should be 
translated to XML.  If the stomp subscription has specified a transform, 
obviously, I'd use whatever the subscription says to use.

Test case for the backwords conversion:
The following JSON:
{"map":{ 
        "entry":[
                {"string":["name","Dejan"]},
                {"string":["city","Belgrade"]},
                {"string":["id","6"]}
        ] 
}}

Comes back from stomp (when transformation:jms-map-json is supplied) as:
{"map":{
    "entry": [
        {"string":["id","6"]},
        {
            "string":["city","Belgrade"],
            "entry":{
                "string":["name","Dejan"]
            }
       }
    ]
}}

Because the "city" and "name" keys collied.

> Stomp frame translator improvements
> -----------------------------------
>
>                 Key: AMQ-1567
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1567
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Transport
>            Reporter: Dejan Bosanac
>             Fix For: 5.1.0
>
>         Attachments: stomp-transformation-improved.patch
>
>
> * added Spring context for marshaller
> * changed header semantics, e.g jms-xml to jms-object-xml
> * added support for map and byte messages
> * added "transformation error" header
> * ignored jms object "transformation" header

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to