You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Nigel Sim (JIRA)" <ji...@apache.org> on 2016/03/01 12:46:18 UTC

[jira] [Updated] (AMQ-6192) Stomp frame translator not working when a content length is set

     [ https://issues.apache.org/jira/browse/AMQ-6192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nigel Sim updated AMQ-6192:
---------------------------
    Description: 
The stomp frame translator, such as "transformation:jms-map-json" is ignored if the content-length header is set, so you end up with an ActiveMQByesMessage instead of a ActiveMQMapMessage. The spec says this header is optional, but recommended, so I'm not sure why it's presence or absence is used to determine whether to try the frame translators.

The code in question is in org.apache.activemq.transport.stomp.JmsFrameTranslator.convertFrame which says:
{code}
if (headers.containsKey(Headers.CONTENT_LENGTH) || transformation.equals(Transformations.JMS_BYTE.toString())) {
  msg = super.convertFrame(converter, command);
} else {
 // apply frame translator
}
{code}

  was:
The stomp frame translator, such as "transformation:jms-map-json" is ignored if the content-length header is set, so you end up with an ActiveMQByesMessage instead of a ActiveMQMapMessage. The spec says this header is optional, but recommended, so I'm not sure why it's presence or absence is used to determine whether to try the frame translators.

The code in question is in org.apache.activemq.transport.stomp.JmsFrameTranslator.convertFrame which says:
{code}
if (headers.containsKey(Headers.CONTENT_LENGTH) || transformation.equals(Transformations.JMS_BYTE.toString())) {
  msg = super.convertFrame(converter, command);
} else {
 // apply frame translator
}



> Stomp frame translator not working when a content length is set
> ---------------------------------------------------------------
>
>                 Key: AMQ-6192
>                 URL: https://issues.apache.org/jira/browse/AMQ-6192
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>            Reporter: Nigel Sim
>
> The stomp frame translator, such as "transformation:jms-map-json" is ignored if the content-length header is set, so you end up with an ActiveMQByesMessage instead of a ActiveMQMapMessage. The spec says this header is optional, but recommended, so I'm not sure why it's presence or absence is used to determine whether to try the frame translators.
> The code in question is in org.apache.activemq.transport.stomp.JmsFrameTranslator.convertFrame which says:
> {code}
> if (headers.containsKey(Headers.CONTENT_LENGTH) || transformation.equals(Transformations.JMS_BYTE.toString())) {
>   msg = super.convertFrame(converter, command);
> } else {
>  // apply frame translator
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)