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

[AMQ7, AMQP, Openwire] issue consuming amqp message using openwire consumer

XMLWordPrintable

    • +
    • Hide
      Previously, when a message was converted from OpenWire to AMQP and then back to OpenWire, the message could no longer be consumed by an OpenWire client. For example, this situation might occur when:

      1) An OpenWire client sent a message to the broker

      2) An AMQP client consumed the message

      3) The AMQP client returned the message to the broker

      4) An OpenWire consumer tried to consume the message

      This issue is now resolved.
      Show
      Previously, when a message was converted from OpenWire to AMQP and then back to OpenWire, the message could no longer be consumed by an OpenWire client. For example, this situation might occur when: 1) An OpenWire client sent a message to the broker 2) An AMQP client consumed the message 3) The AMQP client returned the message to the broker 4) An OpenWire consumer tried to consume the message This issue is now resolved.
    • Documented as Resolved Issue
    • Verified in a release
    • Hide

      Will attach a test client to demostrate.

      Show
      Will attach a test client to demostrate.

      Getting the following exception when consuming a message sent from an AMQP sender using an Openwire consumer

      2019-11-28 10:35:16,697 WARN  [org.apache.activemq.artemis.core.server] Error during message dispatch: java.lang.ClassCastException: org.apache.activemq.artemis.api.core.SimpleString cannot be cast to [B
      	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.toAMQMessage(OpenWireMessageConverter.java:629) [artemis-openwire-protocol-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.protocol.openwire.OpenWireMessageConverter.createMessageDispatch(OpenWireMessageConverter.java:501) [artemis-openwire-protocol-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer.handleDeliver(AMQConsumer.java:258) [artemis-openwire-protocol-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.sendMessage(AMQSession.java:312) [artemis-openwire-protocol-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:1150) [artemis-server-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:504) [artemis-server-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.server.impl.QueueImpl.proceedDeliver(QueueImpl.java:3443) [artemis-server-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:2809) [artemis-server-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.server.impl.QueueImpl.access$2300(QueueImpl.java:119) [artemis-server-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:3781) [artemis-server-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66) [artemis-commons-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      	at org.apache.activemq.artemis.utils.actors.ProcessorBase$$Lambda$24/1810742349.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_20]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_20]
      	at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.10.0.redhat-00004.jar:2.10.0.redhat-00004]
      

      To reproduce the issue I had to:
      1) send a message to the broker using openwire
      2) consume that message using AMQP client
      3) send that message back to the broker using AMQP client

      Result: message could not be consumed by Openwire consumer

      I suspect the issue is related to the handling of the HDR properties in the above conversions.

              dbruscin Domenico Francesco Bruscino
              dbruscin Domenico Francesco Bruscino
              Tiago Bueno Tiago Bueno
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: