activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Toth (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ARTEMIS-1458) Diverts are not working with AMQP protocol
Date Tue, 10 Oct 2017 11:04:00 GMT
Michal Toth created ARTEMIS-1458:
------------------------------------

             Summary: Diverts are not working with AMQP protocol
                 Key: ARTEMIS-1458
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1458
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker, OpenWire
    Affects Versions: 2.3.0
         Environment: Diverts exclusive/non-exclusive
Openwire clients
            Reporter: Michal Toth


Both type of diverts are not working with OpenWire protocol.

Broker stacktrace error
{noformat}
12:58:10,848 WARN  [org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession] Cannot
publish to a non-existent Destination: queue://testDivert: javax.jms.InvalidDestinationException:
Cannot publish to a non-existent Destination: queue://testDivert
        at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.lambda$send$0(AMQSession.java:360)
[artemis-openwire-protocol-2.0.0.amq-700013-redhat-1.jar:]
        at org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.checkMemory(PagingStoreImpl.java:696)
[artemis-server-2.0.0.amq-700013-redhat-1.jar:2.0.0.amq-700013-redhat-1]
        at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.send(AMQSession.java:353)
[artemis-openwire-protocol-2.0.0.amq-700013-redhat-1.jar:]
        at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection$CommandProcessor.processMessage(OpenWireConnection.java:1366)
[artemis-openwire-protocol-2.0.0.amq-700013-redhat-1.jar:]
        at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:768) [activemq-client-5.11.0.redhat-630283.jar:5.11.0.redhat-630283]
        at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:271)
[artemis-openwire-protocol-2.0.0.amq-700013-redhat-1.jar:]
        at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:628)
[artemis-server-2.0.0.amq-700013-redhat-1.jar:2.0.0.amq-700013-redhat-1]
        at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:69)
[artemis-core-client-2.0.0.amq-700013-redhat-1.jar:2.0.0.amq-700013-redhat-1]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:1017)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:394) [netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:299) [netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
[netty-all-4.1.9.Final-redhat-2.jar:4.1.9.Final-redhat-2]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]

12:58:11,189 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection
failed, clearing up resources for session e7c0cd3c-ada9-11e7-8016-525400061be7
12:58:11,190 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources
for session e7c0cd3c-ada9-11e7-8016-525400061be7
12:58:11,190 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection
failed, clearing up resources for session ID:dhcp-145-96.lab.eng.brq.redhat.com-33090-1507633090593-1:1:-1
12:58:11,191 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources
for session ID:dhcp-145-96.lab.eng.brq.redhat.com-33090-1507633090593-1:1:-1
12:58:11,214 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection
failed, clearing up resources for session ID:dhcp-145-96.lab.eng.brq.redhat.com-33090-1507633090593-1:1:1
12:58:11,214 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources
for session ID:dhcp-145-96.lab.eng.brq.redhat.com-33090-1507633090593-1:1:1

{noformat}

Client error
{noformat}
$ java  -jar /var/dtests/node_data/clients/aoc7.jar sender --log-msgs dict --broker <broker>:61616
--conn-username admin --conn-password admin --address testDivert --count 1
12:55:27,010 ERROR Error while sending a message!
javax.jms.InvalidDestinationException: Cannot publish to a non-existent Destination: queue://testDivert
	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)
{noformat}

{code:xml}
<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="urn:activemq:core ">

      <name>amq</name>

      <persistence-enabled>true</persistence-enabled>

      <!-- this could be ASYNCIO or NIO
       -->
      <journal-type>ASYNCIO</journal-type>

      <paging-directory>./data/paging</paging-directory>

      <bindings-directory>./data/bindings</bindings-directory>

      <journal-directory>./data/journal</journal-directory>

      <large-messages-directory>./data/large-messages</large-messages-directory>

      <journal-datasync>true</journal-datasync>

      <journal-min-files>2</journal-min-files>

      <journal-pool-files>-1</journal-pool-files>

      <!--
        You can verify the network health of a particular NIC by specifying the <network-check-NIC>
element.
         <network-check-NIC>theNicName</network-check-NIC>
        -->

      <!--
        Use this to use an HTTP server to validate the network
         <network-check-URL-list>http://www.apache.org</network-check-URL-list>
-->

      <!-- <network-check-period>10000</network-check-period> -->
      <!-- <network-check-timeout>1000</network-check-timeout> -->

      <!-- this is a comma separated list, no spaces, just DNS or IPs
           it should accept IPV6

           Warning: Make sure you understand your network topology as this is meant to validate
if your network is valid.
                    Using IPs that could eventually disappear or be partially visible may
defeat the purpose.
                    You can use a list of multiple IPs, and if any successful ping will make
the server OK to continue running -->
      <!-- <network-check-list>10.0.0.1</network-check-list> -->

      <!-- use this to customize the ping used for ipv4 addresses -->
      <!-- <network-check-ping-command>ping -c 1 -t %d %s</network-check-ping-command>
-->

      <!-- use this to customize the ping used for ipv6 addresses -->
      <!-- <network-check-ping6-command>ping6 -c 1 %2$s</network-check-ping6-command>
-->



      <!--
       This value was determined through a calculation.
       Your system could perform 0.25 writes per millisecond
       on the current journal configuration.
       That translates as a sync write every 4020000 nanoseconds
      -->
      <journal-buffer-timeout>4020000</journal-buffer-timeout>


      <!-- how often we are looking for how many bytes are being used on the disk in ms
-->
      <disk-scan-period>5000</disk-scan-period>

      <!-- once the disk hits this limit the system will block, or close the connection
in certain protocols
           that won't support flow control. -->
      <max-disk-usage>90</max-disk-usage>

      <!-- the system will enter into page mode once you hit this limit.
           This is an estimate in bytes of how much the messages are using in memory -->
      <global-max-size>100Mb</global-max-size>

      <!-- should the broker detect dead locks and other issues -->
      <critical-analyzer>true</critical-analyzer>

      <critical-analyzer-timeout>120000</critical-analyzer-timeout>

      <critical-analyzer-check-period>60000</critical-analyzer-check-period>

      <critical-analyzer-policy>HALT</critical-analyzer-policy>


      <diverts>
        <divert name="test-divert">
<!--	  <routing-name>testDivert</routing-name>  -->
          <address>testDivert</address>
          <forwarding-address>spyDivert</forwarding-address>
          <exclusive>true</exclusive>
        </divert>
      </diverts>

      <acceptors>

         <!-- useEpoll means: it will use Netty epoll if you are on a system (Linux) that
supports it -->
         <!-- amqpCredits: The number of credits sent to AMQP producers -->
         <!-- amqpLowCredits: The server will send the # credits specified at amqpCredits
at this low mark -->

         <!-- Acceptor for every supported protocol -->
         <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor>

         <!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.-->
         <acceptor name="amqp">tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpMinCredits=300</acceptor>

         <!-- STOMP Acceptor. -->
         <acceptor name="stomp">tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>

         <!-- HornetQ Compatibility Acceptor.  Enables HornetQ Core and STOMP for legacy
HornetQ clients. -->
         <acceptor name="hornetq">tcp://0.0.0.0:5445?protocols=HORNETQ,STOMP;useEpoll=true</acceptor>

         <!-- MQTT Acceptor -->
         <acceptor name="mqtt">tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>

      </acceptors>


      <security-settings>
         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="amq"/>
            <permission type="deleteNonDurableQueue" roles="amq"/>
            <permission type="createDurableQueue" roles="amq"/>
            <permission type="deleteDurableQueue" roles="amq"/>
            <permission type="createAddress" roles="amq"/>
            <permission type="deleteAddress" roles="amq"/>
            <permission type="consume" roles="amq"/>
            <permission type="browse" roles="amq"/>
            <permission type="send" roles="amq"/>
            <!-- we need this otherwise ./artemis data imp wouldn't work -->
            <permission type="manage" roles="amq"/>
         </security-setting>
      </security-settings>

      <address-settings>
         <!-- if you define auto-create on certain queues, management has to be auto-create
-->
         <address-setting match="activemq.management#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            <!-- with -1 only the global-max-size is in use for limiting -->
            <max-size-bytes>-1</max-size-bytes>
            <message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
         <!--default for catch all-->
         <address-setting match="#">
            <dead-letter-address>DLQ</dead-letter-address>
            <expiry-address>ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            <!-- with -1 only the global-max-size is in use for limiting -->
            <max-size-bytes>-1</max-size-bytes>
            <message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
            <auto-create-queues>true</auto-create-queues>
            <auto-create-addresses>true</auto-create-addresses>
            <auto-create-jms-queues>true</auto-create-jms-queues>
            <auto-create-jms-topics>true</auto-create-jms-topics>
         </address-setting>
      </address-settings>

      <addresses>
	<address name="testDivert">
	  <anycast>
		<queue name="testDivert"/>
	  </anycast> 
	</address>
	<address name="spyDivert">
	    <anycast>
		<queue name="spyDivert"/>
	    </anycast>
	</address>

         <address name="DLQ">
            <anycast>
               <queue name="DLQ" />
            </anycast>
         </address>
         <address name="ExpiryQueue">
            <anycast>
               <queue name="ExpiryQueue" />
            </anycast>
         </address>
      </addresses>

   </core>
</configuration>
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message