Uploaded image for project: 'A-MQ Broker'
  1. A-MQ Broker
  2. ENTMQBR-753

Unable to send messages to queue with defined 'purgeOnNoConsumers' using OpenWire client

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: AMQ 7.0.2.GA
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      rhel 7, default configuration of broker, OpenWire client used
      queue durable: false
      queue temporary: false
      auto-create-queues and auto-delete-queues is disabled

    • Steps to Reproduce:
      Hide

      1) start the broker with default configuration

      /opt/<broker-instance>/bin/artemis run
      

      2) set up a queue with flag 'purgeOnNoConsumers'

      java -jar /var/dtests/node_data/clients/amqx.jar  queue --host <host>:1099 --action add --name "test_purge_msgs_on_no_consumers" --max-consumers 2 --delete-on-no-consumer True
      

      3) check that queue has been successfully created and has 'purgeOnNoConsumers' flag set as true

      java  -jar /var/dtests/node_data/clients/amqx.jar  queue --host <host>:1099 --action properties --name "test_purge_msgs_on_no_consumers"
      

      4) attempt to send some message with OpenWire client (running the receiver is optional in this case since we don't care about delivering the messages)

      java  -jar /var/dtests/node_data/clients/aoc7.jar sender  --log-msgs dict --broker tcp://<host>:61616 --conn-username admin --conn-password admin --address "test_purge_msgs_on_no_consumers" --count 5
      
      Show
      1) start the broker with default configuration /opt/<broker-instance>/bin/artemis run 2) set up a queue with flag 'purgeOnNoConsumers' java -jar /var/dtests/node_data/clients/amqx.jar queue --host <host>:1099 --action add --name "test_purge_msgs_on_no_consumers" --max-consumers 2 --delete-on-no-consumer True 3) check that queue has been successfully created and has 'purgeOnNoConsumers' flag set as true java -jar /var/dtests/node_data/clients/amqx.jar queue --host <host>:1099 --action properties --name "test_purge_msgs_on_no_consumers" 4) attempt to send some message with OpenWire client (running the receiver is optional in this case since we don't care about delivering the messages) java -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict --broker tcp://<host>:61616 --conn-username admin --conn-password admin --address "test_purge_msgs_on_no_consumers" --count 5

      Description

      OpenWire client is unable to send messages due to routing failure if targeted queue has 'purgeOnNoConsumers' flag set on true. If OpenWire client attempts to send messages into such queue broker throws following exception (exception as it appears on side of a client):

      DestinationException

      18:19:45,779 ERROR Error while sending a message!
      javax.jms.InvalidDestinationException: Cannot publish to a non-existent Destination: queue://test_purge_msgs_on_no_consumers
      at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.lambda$send$0(AMQSession.java:360)
      at org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.checkMemory(PagingStoreImpl.java:696)
      at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.send(AMQSession.java:353)
      at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection$CommandProcessor.processMessage(OpenWireConnection.java:1366)
      at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:768)
      at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:271)
      at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:628)
      at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:69)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
      at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:1017)
      at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:394)
      at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:299)
      at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
      at java.lang.Thread.run(Thread.java:748)

      However receiving messages from that queue with OpenWire client doesn't cause any issues if message was sent by client using different protocol. AMQP and Core clients are without issue for both sending and receiving.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ataylor Andy Taylor
                  Reporter:
                  rvais Roman Vais
                  Tester:
                  Roman Vais
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: