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

Advisory messages are still empty when received with a Stomp subscription

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.x
    • 5.10.1, 5.11.0
    • Transport
    • None
    • ActiveMQ 5.9.1, Sun Java 1.7.0_51, Ubuntu Linux

    Description

      The subject of this task similiar as AMQ-2098. Bug still exists, and it can be reproduced according to steps below.

      This simple script written in PHP uses standard Stomp client

      $stomp       = new \Stomp('tcp://localhost:61613', 'admin', 'admin');
      $stomp->subscribe('/topic/stats');
      
      $stomp->begin($transaction = microtime(true));
      $status = $stomp->send('/queue/ActiveMQ.Statistics.Destination.testqueue', '', Array('reply-to' => '/topic/stats', 'persistent' => 'true'));
      
      $message = $stomp->readFrame();
      $stomp->ack($message->headers['message-id']);
      $stomp->commit($transaction);
      

      And in $message we'll have empty body paramter. It's because ActiveMQ returned message without body that's show in a captured packets between ActiveMQ and PHP communication below

      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      CONNECT
      login:admin
      passcode:admin
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      .
      
      T 127.0.0.1:61613 -> 127.0.0.1:53988 [AP]
      CONNECTED
      heart-beat:0,0
      session:ID:amneziac-59996-1402320672417-5:8
      server:ActiveMQ/5.9.1
      version:1.0
      .
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      SUBSCRIBE
      ack:client
      destination:/topic/stats
      activemq.prefetchSize:1
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      .
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      BEGIN
      transaction:1402321825.9952
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      .
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      SEND
      reply-to:/topic/stats
      persistent:true
      destination:/queue/ActiveMQ.Statistics.Destination.testqueue
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      .
      
      T 127.0.0.1:61613 -> 127.0.0.1:53988 [AP]
      MESSAGE
      message-id:ID:amneziac-59996-1402320672417-2:1:0:0:8
      type:Advisory
      destination:/topic/stats
      timestamp:1402321826311
      expires:0
      priority:4
      .
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      ACK
      message-id:ID:amneziac-59996-1402320672417-2:1:0:0:8
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      .
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP]
      COMMIT
      transaction:1402321825.9952
      
      T 127.0.0.1:53988 -> 127.0.0.1:61613 [AFP]
      .
      DISCONNECT
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vchampion Vladislav Krakhalev
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: