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

Cannot correctly interpret MapMessage from Java broker 5.6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.4.4
    • None
    • CMS Impl, Openwire
    • None
    • linux, broker version 5.6

    Description

      I am trying to receive MapMessage (in C++) generated from Java application via broker version 5.6.

      The message is received and is interpreted as a MapMessage. However, it reports all properties as non existent. But I can see the properties using Wireshark.

      I have the network capture, but dont find a place to paste it here.

      this is the relevant code:

      <pre>
      // Called from the consumer since this class is a registered MessageListener.
      virtual void onMessage( const Message* message ) throw() {

      static int count = 0;

      try
      {
      count++;

      const MapMessage* mapMessage =
      dynamic_cast<const MapMessage* >( message );
      string text = "";

      if( mapMessage != NULL ) {
      //text = textMessage->getText();
      //text = mapMessage->toString();
      //text = mapMessage->getString("TEXT");
      //text = mapMessage->getString("DESTINATION_ADDRESS");
      text = mapMessage->getString("ORIGIN_ADDRESS");
      if ( mapMessage->itemExists("TEXT") )

      { printf("EXISTS\n"); }

      } else

      { text = "NOT A MAP MESSAGE!"; }

      Attachments

        1. mapmessage.pcap
          0.4 kB
          Andres Velasco

        Activity

          People

            tabish Timothy A. Bish
            andres.velasco Andres Velasco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: