Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-5159

openwire consumer can't consume messages produced by qpid python amqp client with bytes as message properties

    XMLWordPrintable

    Details

    • Target Release:
    • Steps to Reproduce:
      Hide
      • Here producer is qpid python amqp client and consumer is Openwire.
      • While producing message, in message-properties bytes is set.
      • This used to work in earlier release of AMQ 7.x(I checked in AMQ 7.2.1 and it worked). but in AMQ 7.7, 7.8 it throws error.
        Caused by: javax.jms.MessageFormatException: Only objectified primitive objects, String, Map and List types are allowed but was: [B@708a893 type: class [B
        	at org.apache.activemq.command.ActiveMQMessage.checkValidObject(ActiveMQMessage.java:538) [activemq-client-5.11.0.redhat-630495.jar:5.11.0.redhat-630495]
        	at org.apache.activemq.command.ActiveMQMessage.setObjectProperty(ActiveMQMessage.java:504) [activemq-client-5.11.0.redhat-630495.jar:5.11.0.redhat-630495]
        	at org.apache.activemq.command.ActiveMQMessage.setObjectProperty(ActiveMQMessage.java:488) [activemq-client-5.11.0.redhat-630495.jar:5.11.0.redhat-630495]
        	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.setAMQMsgObjectProperties(OpenWireMessageConverter.java:964) [artemis-openwire-protocol-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
        	... 16 more 
      • Message remains in DELIVERING_COUNT.
        [chandrashekhar@localhost bin]$ ./artemis queue stat
        Connection brokerURL = tcp://localhost:61616
        |NAME                     |ADDRESS                  |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
        |xyz                      |xyz                      |1              |1             |1              |1                |0              |0               |ANYCAST      |
        [chandrashekhar@localhost bin]$ 
         

         

      • Attached is qpid python client. We can run it as
        $ python queue-send.py 0.0.0.0:5672 xyz 123heyhey
        SEND: Opened sender for target address 'xyz'
        SEND: Sent message '123heyhey'
         
      • Attached is openwire consumer. We can run it as
      $ mvn exec:java -D"exec.mainClass"="com.mycompany.activemq.sender.receiver.QueueReceive" -D"exec.args"="tcp://localhost:61616" 
      Show
      Here producer is qpid python amqp client and consumer is Openwire. While producing message, in message-properties bytes is set. This used to work in earlier release of AMQ 7.x(I checked in AMQ 7.2.1 and it worked). but in AMQ 7.7, 7.8 it throws error. Caused by: javax.jms.MessageFormatException: Only objectified primitive objects, String , Map and List types are allowed but was: [B@708a893 type: class [B at org.apache.activemq.command.ActiveMQMessage.checkValidObject(ActiveMQMessage.java:538) [activemq-client-5.11.0.redhat-630495.jar:5.11.0.redhat-630495] at org.apache.activemq.command.ActiveMQMessage.setObjectProperty(ActiveMQMessage.java:504) [activemq-client-5.11.0.redhat-630495.jar:5.11.0.redhat-630495] at org.apache.activemq.command.ActiveMQMessage.setObjectProperty(ActiveMQMessage.java:488) [activemq-client-5.11.0.redhat-630495.jar:5.11.0.redhat-630495] at org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.setAMQMsgObjectProperties(OpenWireMessageConverter.java:964) [artemis-openwire-protocol-2.16.0.redhat-00012.jar:2.16.0.redhat-00012] ... 16 more Message remains in DELIVERING_COUNT. [chandrashekhar@localhost bin]$ ./artemis queue stat Connection brokerURL = tcp: //localhost:61616 |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE | |xyz |xyz |1 |1 |1 |1 |0 |0 |ANYCAST | [chandrashekhar@localhost bin]$   Attached is qpid python client. We can run it as $ python queue-send.py 0.0.0.0:5672 xyz 123heyhey SEND: Opened sender for target address 'xyz' SEND: Sent message '123heyhey' Attached is openwire consumer. We can run it as $ mvn exec:java -D "exec.mainClass" = "com.mycompany.activemq.sender.receiver.QueueReceive" -D "exec.args" = "tcp: //localhost:61616"

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            dbruscin Domenico Francesco Bruscino
            Reporter:
            cpandey Chandra Shekhar Pandey
            Tester:
            Roman Vais Roman Vais
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: