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

Solution Verified - Updated -

Issue

  • opewire consumer can't consume messages after upgrading broker from 7.5 to 7.8.1.
  • Producer is python amqp based.
  • In broker log files we see the following error:
2021-03-25 10:57:45,334 WARN  [org.apache.activemq.artemis.core.server] Error during message dispatch: java.io.IOException: exception setting property WMQ_UserIdentifier : [B@708a893
    at org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.setAMQMsgObjectProperties(OpenWireMessageConverter.java:968) [artemis-openwire-protocol-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.toAMQMessage(OpenWireMessageConverter.java:697) [artemis-openwire-protocol-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.createMessageDispatch(OpenWireMessageConverter.java:502) [artemis-openwire-protocol-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer.handleDeliver(AMQConsumer.java:268) [artemis-openwire-protocol-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.sendMessage(AMQSession.java:309) [artemis-openwire-protocol-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:1169) [artemis-server-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:508) [artemis-server-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.server.impl.QueueImpl.proceedDeliver(QueueImpl.java:3746) [artemis-server-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:3049) [artemis-server-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.server.impl.QueueImpl.access$2400(QueueImpl.java:126) [artemis-server-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:4121) [artemis-server-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_275]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_275]
    at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.16.0.redhat-00012.jar:2.16.0.redhat-00012]
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

Environment

  • Red Hat AMQ 7.8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content