0 Replies Latest reply on Dec 7, 2017 5:24 AM by Rabbit Rabbit10

    How to catch ActiveMQAddressFullException in wildfly 10.1.0

    Rabbit Rabbit10 Newbie

      Hi,

       

      I have configured messaging subsystem address policy setting to FAIL because I would like to perform some actions when topic is full. I expected that I will get this exception when publishing message, but that is not the case - exception is only logged. I am using jms API so publish messages (javax.jms.MessageProducer.send(Message)), and this exception is ActiveMQ's and is checked.

       

      Messaging configuration:

      <address-setting name="#" max-size-bytes="30000" page-size-bytes="0" address-full-policy="FAIL"/>

       

      Error in log:

      2017-12-07 03:40:53,702 ERROR [org.apache.activemq.artemis.core.server] (Thread-25 (ActiveMQ-remoting-threads-ActiveMQServerImpl::serverUUID=028f89be-db2a-11e7-b743-2542068cfed0-1273486178-938324982)) AMQ224016: Caught

      exception: ActiveMQAddressFullException[errorType=ADDRESS_FULL message=AMQ119102: Address "jms.topic.myTopic" is full.]

              at org.apache.activemq.artemis.core.paging.impl.PagingStoreImpl.page(PagingStoreImpl.java:729)

              at org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.addToPage(JournalStorageManager.java:3251)

              at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.processRoute(PostOfficeImpl.java:951)

              at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:670)

              at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:574)

              at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doSend(ServerSessionImpl.java:1579)

              at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1291)

              at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:430)

              at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:630)

              at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:347)

              at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:329)

              at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:619)

              at org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:172)

              at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:103)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

       

      Is there way I could catch this exception in my application that is running on Wildfly?

       

      Thank you in advance!