Uploaded image for project: 'ActiveMQ C++ Client'
  1. ActiveMQ C++ Client
  2. AMQCPP-32

Stomp messages don't preserve property types: please document this behaviour

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.1
    • 1.1
    • Stomp
    • None

    Description

      I am producing messages from Java and C++ using ActiveMQ and AMQCPP, respectively. Messages I produce have an int property set on them which I want to select on, again in Java or C++.

      As far as I can tell from the Stomp Protocol specification there is no way to specify the types of message headers. As a result, all the messages end up with String properties as can be be seen in the unmarshal method of org.apache.activemq.transport.stomp.

      I can work around this problem by selecting on id=123||id='123' in both Java and C++, but it seems a bit suboptimal.

      At least, this issue should be documented somewhere in activemq::connector::stomp::commands::StompMessage to help other people who can't figure out why their selectors don't work.

      We could consider adding a function that allows the user to specify that Stomp message properties should be sent in a type safe manner, and then prepend some kind of string to the property name to indicate the type. StompWireFormat on the Java side could check for this case and set the typed properties accordingly. This is probably too much of a hack – people who want typed properties to work right can use Openwire in the (hopefully) near future.

      Attachments

        Activity

          People

            nmittler Nathan Christopher Mittler
            fullung Albert Strasheim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: