Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3543

STOMP connector: unexpected reply-to value for remote temporary topic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.x
    • 5.6.0
    • STOMP
    • None

    Description

      The reply-to header on a MESSAGE frame resulting from the sending of a message (SEND) with the reply-to header set to a temporary topic is in the form /temp-topic/<local-temp-topic-name> rather than the expected
      /remote-temp-topic/<system_generated_name>

      This only happens when the same connection is used for sending and receiving messages. When a temporary queue is used, the reply-to appears as /remote-temp-queue/xxx as expected. So even if one takes the position that it is reasonable for the local name to be used given that everything is on the same connection, there is an inconsistency between the topic and queue cases. For our purposes we would prefer that the remote form be used always, because we are actually servicing two different users on the same connection (first user does the SEND, second user receives the MESSAGE).

      Test case for the underlying ActiveMQ bug is attached: StompRemoteTempTopic.java

      To reproduce, drop this file into $ACTIVEMQ_HOME/example/src, edit build.xml in the example
      directory to add the following:

      <target name="bug" depends="compile" description="Runs test case for replyTo TempTopic bug">
      <echo>Running a Stomp example</echo>
      <java classname="StompRemoteTempTopic" fork="yes" maxmemory="100M">
      <classpath refid="javac.classpath" />
      <jvmarg value="-server" />
      </java>
      </target>

      and run by issuing the command "ant bug". Output is as follows:

      [echo] Running a Stomp example
      [java] =====================================================
      [java] Test run using temporary topic
      [java] -----------------------------------------------------
      [java] Sending request message: SEND with reply-to=/temp-topic/2C26441740C0ECC9tt1
      [java] Received request message: MESSAGE with reply-to=/temp-topic/2C26441740C0ECC9tt1
      [java] Response MESSAGE received
      [java] =====================================================
      [java] Test run using temporary queue
      [java] -----------------------------------------------------
      [java] Sending request message: SEND with reply-to=/temp-queue/2C26441740C0ECC9tt1
      [java] Received request message: MESSAGE with reply-to=/remote-temp-queue/ID:ChrisBarrow-lap-61815-1318539910206-4:6:1
      [java] Response MESSAGE received

      This makes it easy to see that for the queue case the reply-to is set to the remote temporary queue but for the topic case the local temporary topic is specified.

      Attachments

        1. StompRemoteTempTopic.java
          4 kB
          Christopher Barrow

        Activity

          People

            tabish Timothy A. Bish
            chris.barrow Christopher Barrow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: