ActiveMQ
  1. ActiveMQ
  2. AMQ-739

STOMP transport handles JMS type improperly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.0, 4.0.1
    • Fix Version/s: None
    • Component/s: Transport
    • Labels:
      None
    • Environment:

      sending from STOMP to JMS

      Description

      Sending a text message from a stomp client with a content-length results in a bytes message on JMS. Suggest doing the following ...

      1) The stomp transport should always add the content-length header to out-going messages, regardless of content-type or whether or not a content-length was provided on the incoming message.
      2) The stomp transport should handle in-coming messages with a content-type header, and should pass that through.
      3) If a message comes in without a content-length or a content-type, it should just be assumed a TextMessage. This way we can use the terminating null character as the delimiter.

        Activity

        Hide
        Nathan Mittler added a comment -

        Since ActiveMQ already correctly identifies TextMessages and BytesMessages based on content-length, no action is necessary.

        The documenation was updated on the wiki to make it clear how to create Text/Bytes messages from Stomp: http://www.activemq.org/site/stomp.html

        Show
        Nathan Mittler added a comment - Since ActiveMQ already correctly identifies TextMessages and BytesMessages based on content-length, no action is necessary. The documenation was updated on the wiki to make it clear how to create Text/Bytes messages from Stomp: http://www.activemq.org/site/stomp.html
        Hide
        Nathan Mittler added a comment -

        clients can use bytes and text messages so long as they follow AMQ's scheme for making the distinction: if content-length is specified, it's a bytes message, otherwise it's text.

        So I don't think any action needs to be taken on this issue other than updating AMQ's stomp page to make it clear how to make the distinction between bytes and text using the stomp protocol.

        Show
        Nathan Mittler added a comment - clients can use bytes and text messages so long as they follow AMQ's scheme for making the distinction: if content-length is specified, it's a bytes message, otherwise it's text. So I don't think any action needs to be taken on this issue other than updating AMQ's stomp page to make it clear how to make the distinction between bytes and text using the stomp protocol.
        Hide
        Nathan Mittler added a comment -

        It isn't possible to reuse the "type" header (JMSType) for the purpose of sending through the information as to what type of message it is (text or bytes). So this means that we need to add another activemq extension header. I propose "amq-msg-type".

        Show
        Nathan Mittler added a comment - It isn't possible to reuse the "type" header (JMSType) for the purpose of sending through the information as to what type of message it is (text or bytes). So this means that we need to add another activemq extension header. I propose "amq-msg-type".
        Hide
        Hiram Chirino added a comment -

        Lets tentavly target 4.1 for this feature.

        Show
        Hiram Chirino added a comment - Lets tentavly target 4.1 for this feature.

          People

          • Assignee:
            Nathan Mittler
            Reporter:
            Nathan Mittler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 168h
              168h
              Remaining:
              Remaining Estimate - 168h
              168h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development