ActiveMQ Artemis blocks on createQueueConnection - jms

I'm implementing custom log4j appender for sending logs to jms queue, at initialization of connection with this code:
QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) jndi.lookup("QueueConnectionFactory");
QueueConnection queueConnection = queueConnectionFactory.createQueueConnection();
Queue queue = (Queue) jndi.lookup("dynamicQueues/LogQueue");
QueueSession queueSession = queueConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender = queueSession.createSender(queue);
queueConnection.start();
queueConnectionFactory.createQueueConnection() call blocks execution and never ends.
Last things in server logs:
18:54:09.038 [RMI TCP Connection(3)-127.0.0.1] WARN (NettyConnection.java:506) AMQ212041: Timed out waiting for netty channel to close
18:54:09.038 [RMI TCP Connection(3)-127.0.0.1] WARN (NettyConnection.java:506) AMQ212041: Timed out waiting for netty channel to close
In Artemis logs:
ERROR [org.apache.activemq.artemis.core.server] AMQ224088: Timeout (10 seconds) while handshaking has occurred.
Thread-dumps at time of this block and later doesn't distinguish and contains:
"RMI TCP Connection(3)-127.0.0.1" #18 daemon prio=5 os_prio=0 tid=0x000000002102c800 nid=0x11234 in Object.wait() [0x0000000021eb8000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007af824518> (a io.netty.channel.group.DefaultChannelGroupFuture)
at java.lang.Object.wait(Object.java:502)
at io.netty.util.concurrent.DefaultPromise.awaitUninterruptibly(DefaultPromise.java:243)
- locked <0x00000007af824518> (a io.netty.channel.group.DefaultChannelGroupFuture)
at io.netty.channel.group.DefaultChannelGroupFuture.awaitUninterruptibly(DefaultChannelGroupFuture.java:183)
at io.netty.channel.group.DefaultChannelGroupFuture.awaitUninterruptibly(DefaultChannelGroupFuture.java:40)
at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.close(NettyConnector.java:720)
- locked <0x00000007af7fdcd0> (a org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.checkCloseConnection(ClientSessionFactoryImpl.java:882)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.closeCleanSessions(ClientSessionFactoryImpl.java:452)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.interruptConnectAndCloseAllSessions(ClientSessionFactoryImpl.java:427)
- locked <0x00000007af823d70> (a java.lang.Object)
at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.cleanup(ClientSessionFactoryImpl.java:471)
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:811)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:844)
- locked <0x00000007af7cdf58> (a org.apache.activemq.artemis.jms.client.ActiveMQQueueConnectionFactory)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createQueueConnection(ActiveMQConnectionFactory.java:333)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createQueueConnection(ActiveMQConnectionFactory.java:329)
... common stacktrace
at org.apache.log4j.Logger.getLogger(Logger.java:117)
Locked ownable synchronizers:
- <0x00000006c3830398> (a java.util.concurrent.ThreadPoolExecutor$Worker)
According to stacktrace it blocks in org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl at factory.cleanup() when connectionTimedOutOnReceiveTopology exception must be thrown.
if (this.topology != null && !factory.waitForTopology(this.callTimeout, TimeUnit.MILLISECONDS)) {
factory.cleanup();
throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(this.discoveryGroup);
} else {
this.addFactory(factory);
return factory;
}
Facing this issue using ActiveMQ Artemis 2.7.0 single node and also 2 active/passive nodes cluster.
Are there any possible client configuration or connection code mistakes which can provoke such an error? Or any way to find cause?
Update:
InitialContext created manually with these code. Tried adding ?type=QUEUE_CF to java.naming.provider.url, problem remained.
Properties env = new Properties();
env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
env.put("java.naming.provider.url", "(tcp://artemis-1:61616,tcp://artemis-2:61626,tcp://artemis-2:61616,tcp://artemis-1:61626)?reconnectAttempts=-1");
Context jndi = new InitialContext(env);
Corresponding acceptor config in broker.xml is default. Tried adding ;handshake-timeout=0, it only removed Artemis log.
<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>

Related

Continuous connection retry attempts of ibm mq consumer resulting into memory leak after a while resulting into jvm crash. How to resolve this?

Take a instance why IBM Mq instance goes down. Now message consumer in my application retries to connect after fixed delay of 5000ms.
2020-10-13 08:37:27.178 ERROR 81638 [] --- [org.springframework.integration.jms.JmsOutboundGateway#1.replyListener-1] o.s.i.j.JmsOutboundGateway$GatewayReplyListenerContainer - Could not refresh JMS Connection for destination 'null' - retrying using FixedBackOff{interval=5000, currentAttempts=4, maxAttempts=unlimited}. Cause: JMSWMQ0018: Failed to connect to queue manager 'X' with connection mode 'Client' and host name '10.158.144.79(1417)'.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').
2020-10-13 08:41:05.546 ERROR 81638 [] --- [org.springframework.integration.jms.JmsOutboundGateway#0.replyListener-1] o.s.i.j.JmsOutboundGateway$GatewayReplyListenerContainer - Could not refresh JMS Connection for destination 'null' - retrying using FixedBackOff{interval=5000, currentAttempts=3, maxAttempts=unlimited}. Cause: JMSWMQ0018: Failed to connect to queue manager 'X' with connection mode 'Client' and host name '10.158.144.79(1417)'.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').
This results in memory leak after a while and jvm crashes. How can we resolve this?
Below is how i am building connection factory
#Bean
public ConnectionFactory connectionFactory() throws JMSException {
MQQueueConnectionFactory mqconnectionfactory = new MQQueueConnectionFactory();
mqconnectionfactory.setHostName(properties.getHost());
mqconnectionfactory.setChannel(properties.getAppChannel());
mqconnectionfactory.setPort(Integer.parseInt(properties.getPort()));
mqconnectionfactory.setQueueManager(properties.getQueueManager());
mqconnectionfactory.setTransportType(WMQConstants.WMQ_CM_CLIENT);
mqconnectionfactory.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT);
mqconnectionfactory.setStringProperty(properties.PROPERTY_USER_ID, mqProperties.getUsername());
return wrapConnectionFactoryWithCachingConnectionFactory(mqconnectionfactory);
}
private ConnectionFactory wrapConnectionFactoryWithCachingConnectionFactory(ConnectionFactory connectionFactory) {
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(connectionFactory);
cachingConnectionFactory.setSessionCacheSize(20);
cachingConnectionFactory.setCacheConsumers(false);
return cachingConnectionFactory;
}
OutboundGatway configuration :
<int-jms:outbound-gateway request-channel="getBrandingSerializedEntryPointResponseChannel" reply-channel="getBrandingDeserializedEntryPointResponseChannel"
requires-reply="true" correlation-key="JMSCorrelationID"
request-destination-name="${fbu.request.banding.queue}"
reply-destination-name="${fbu.response.banding.queue}"
receive-timeout="${fbu.queue.receive.timeout}"
connection-factory="brandingConnectionFactory">
<int-jms:reply-listener recovery-interval="${mq.connection.recovery.interval}"/>
</int-jms:outbound-gateway>
You did not mention which IBM MQ client version you are using. There are MQ java client fixes like IT29114 or IT26789. Maybe you experience one of them.

RabbitHandler to create consumer and retry on Fatal Exception in Spring for queue on listening to RabbitMQ

I am using Spring AMQP RabbitHandler and have written the following code:
#RabbitListener(queues = "#{testQueue.name}")
public class Tut4Receiver {
#RabbitHandler
public void receiveMessage(String message){
System.out.println("Message received "+message);
}
}
The Queue is defined like:-
#Bean
public Queue testQueue() {
return new AnonymousQueue();
}
I am using separate code to initialize the Connection Factory.
My question is if RabbitMQ is down for some time, it keeps on retrying to create a consumer but only if it receives a ConnectionRefused error. But suppose the user does not exist in RabbitMQ and there is a gap in which a new user will be created, then it receives a fatal error from RabbitMQ and it never retries due to which the result is auto delete queue would be created on RabbitMQ without any consumers.
Stack Trace:
SimpleMessageListenerContainer] [SimpleAsyncTaskExecutor-11] [|] [|||] Consumer received fatal exception on startup
org.springframework.amqp.rabbit.listener.exception.FatalListenerStartupException: Authentication failure
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:476)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1280)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:65)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:309)
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:547)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:90)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:140)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:76)
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:472)
... 2 common frames omitted
Caused by: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:339)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:813)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:767)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:887)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:300)
SimpleMessageListenerContainer] [SimpleAsyncTaskExecutor-11] [|] [|||] Stopping container from aborted consumer
[|] [|||] Waiting for workers to finish.
[|] [|||] Successfully waited for workers to finish.
Any way to retry even on fatal exceptions like when the user does not exist?
Authentication failures are considered fatal by default and not retried.
You can override this behavior by setting a property on the listener container (possibleAuthenticationFailureFatal). The property is not available as a boot property so you have to override boot's container factory...
#Bean(name = "rabbitListenerContainerFactory")
public SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactory(
SimpleRabbitListenerContainerFactoryConfigurer configurer, ConnectionFactory connectionFactory) {
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
configurer.configure(factory, connectionFactory);
factory.setContainerConfigurer(smlc -> smlc.setPossibleAuthenticationFailureFatal(false));
return factory;
}

Rabbit MQ Connection Factory Connecting to Cluster with 2 nodes But separate queue names

Below is my Rabbit setup configured form my middle-ware team.
A cluster having 2 nodes, each node has 1 Queue lets say, Node1 --> Sample.Q1 And Node2 --> Sample.Q2
Queues configured to have 50% of load on rabbit side.
Basically Sample.Q1 and Sample.Q2 receive same type messages, But 2 Queues are created on each host for more resilience and high availability.
I have requested them to keep the same queue across the Nodes, But my middle-ware team is confirmed that they can't create a duplicate queues on the same cluster.
My question is How spring boot supports to create a connection factory and Rabbit listener.
I have code configuration as below, But that is not working I know this is not correct..
#Bean
public CachingConnectionFactory subscriberConnectionFactory() {
CachingConnectionFactory subsCachingConnectionFactory = new CachingConnectionFactory();
subsCachingConnectionFactory.setAddresses(rabbitMqConfig.getSubscriberAddresses()); // host1:port, host2:port
subsCachingConnectionFactory.setUsername(rabbitMqConfig.getSubscriberUsername());
subsCachingConnectionFactory.setPassword(rabbitMqConfig.getSubscriberPassword());
subsCachingConnectionFactory.setVirtualHost(rabbitMqConfig.getVhost());
subsCachingConnectionFactory.setConnectionNameStrategy(f -> "subscriberConnection");
return subsCachingConnectionFactory;
}
#RabbitListener(id="messageListener",queues = "#{rabbitMqConfig.getSubscriberQueueName()}",containerFactory="queueListenerContainer")
public void receiveMessage(Message message, Channel channel, #Header("id") String messageId,
#Header("amqp_deliveryTag") Long deliveryTag) {
LOGGER.info(" Message:"+ message.toString());
}
Queues are configured like Sample.Q1, Sample.Q2.
But this is not working.
----------
Error Log:
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'sample.q1,Hydra.clone.q2' in vhost 'Sample.services', class-id=50, method-id=10)
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:494)
at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:288)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:138)
... 14 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'Sample.q1,Sample.q2' in vhost 'Sample.services', class-id=50, method-id=10)
at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:516)
at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:346)
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:178)
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:111)
at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:670)
at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:48)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:597)
... 1 common frames omitted

Spring rabbitmq amqp connection Factory - How override connection properties

I am trying to use SimpleMessageListenerContainer and Default connection factory, I don't want use properties using spring deault properties spring.rabbitmq.*, I would like to set connection properties at run-time when connection Factory injected. But my container try to connect to localhost, any help is much appriciated
My code example is like this
#Bean
public SimpleMessageListenerContainer queueListenerContainer(AbstractConnectionFactory connectionFactory,
MessageListenerAdapter listenerAdapter) {
connectionFactory.setHost(Arrays.toString(rabbitMqConfig.getSubscriberHosts()));
connectionFactory.setVirtualHost("hydra.services");
connectionFactory.setPort(rabbitMqConfig.getSubscriberPort());
connectionFactory.setUsername(rabbitMqConfig.getSubscriberUsername());
connectionFactory.setPassword(rabbitMqConfig.getSubscriberPassword());
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setQueueNames(rabbitMqConfig.getSubscriberQueueName());
container.setConnectionFactory(connectionFactory);
// container.setQueueNames("SampleQueue"); /*This just for testing.. !*/
container.setMessageListener(listenerAdapter);
container.setAcknowledgeMode(AcknowledgeMode.MANUAL);
container.setDeclarationRetries(5);// This is default to 3, We can twick this and move this to prop
container.setPrefetchCount(100); //Tell the broker how many messages to send to each consumer in a single request.
return container;
}
But still the code this container try to connect to local host.
Logs :
[30m2019-03-17 09:35:43,335[0;39m [34mINFO [0;39m [[34mmain[0;39m] [33morg.springframework.amqp.rabbit.connection.AbstractConnectionFactory[0;39m: Attempting to connect to: [localhost:5672]
[30m2019-03-17 09:35:45,499[0;39m [34mINFO [0;39m [[34mmain[0;39m] [33morg.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer[0;39m: Broker not available; cannot force queue declarations during start
[30m2019-03-17 09:35:45,778[0;39m [34mINFO [0;39m [[34mqueueListenerContainer-1[0;39m] [33morg.springframework.amqp.rabbit.connection.AbstractConnectionFactory[0;39m: Attempting to connect to: [localhost:5672]
[30m2019-03-17 09:35:48,365[0;39m [34mINFO [0;39m [[34mmain[0;39m] [33morg.springframework.boot.StartupInfoLogger[0;39m: Started DftpEppScrubberApplication in 162.706 seconds (JVM running for 164.364)
Edit 2
This way I am getting unknowhost error. I thought initially it was firewall Issue but I checked connection everything seems to be right. I am not sure what is Problem Here!

AMQAuthenticationException for WSO2 ESB Publisher

I'm trying to integrate WSO2 ESB (4.7.0) with WSO2 Message Broker (2.1.0).
This is my use case:
A generic HTTP Client sends a REST request to a PassThrough Proxy
deployed on WSO2 ESB
The ESB Proxy has an outsequence: forwards the request to the real
REST service, then, in the outsequence, it sends the response to a
mediator class (deployed inside the WSO2 ESB)
The mediator class make some stuff and has this method inside, by
which it can publish an event to a topic on the Message Broker:
Code:
private void publishEvent(){
String topicName = "MyEvent";
Properties properties = new Properties();
TopicConnection topicConnection = null;
properties.put("java.naming.factory.initial", "org.wso2.andes.jndi.PropertiesFileInitialContextFactory");
String connectionString = "amqp://admin:admin#clientID/carbon?brokerlist='tcp://localhost:5673'";
properties.put("connectionfactory.QueueConnectionFactory", connectionString);
try {
InitialContext ctx = new InitialContext(properties);
TopicConnectionFactory tcf = (TopicConnectionFactory) ctx.lookup("QueueConnectionFactory");
TopicConnection connection = tcf.createTopicConnection();
TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
Topic topic = session.createTopic(topicName);
TopicPublisher publisher= session.createPublisher(topic);
TextMessage textMessage =
session.createTextMessage("<asd>sono il publisher di WSO2 message Broker!</asd>");
publisher.publish(textMessage);
publisher.close();
}catch (Exception e){
e.printStackTrace();
}
}
On the other end there is a subscriber to the "MyEvent" topic which
is already running.
(I took the code both for Publisher and subscriber from this URL: http://wso2.com/library/articles/2011/12/wso2-esb-example-pubsub-soa/)
When the client sends the REST request to the proxy (1), the mediator is invoked correctly but when it tries to execute the PublishEvent method (3), nothing happens and the WSO2 ESB logs this 530 error:
INFO - ConnectionCloseMethodHandler ConnectionClose frame received
[2013-10-17 12:43:47,733] INFO - ConnectionCloseMethodHandler Error :530: not allowed:Thread-33
[2013-10-17 12:43:47,734] ERROR - AMQStateManager No Waiters for error saving as last error:Attempt to redeclare exchange: amq.topic of type topic to null.
[2013-10-17 12:43:47,735] ERROR - AMQConnection Throwable Received but no listener set: org.wso2.andes.client.AMQAuthenticationException: Attempt to redeclare exchange: amq.topic of type topic to null. [error code 530: not allowed]
ERROR - AMQStateManager No Waiters for error saving as last error:Attempt to redeclare exchange: amq.topic of type topic to null.
[2013-10-17 20:53:44,996] ERROR - AMQConnection error:
org.wso2.andes.client.AMQAuthenticationException: Attempt to redeclare exchange: amq.topic of type topic to null. [error code 530: not allowed]
at org.wso2.andes.client.handler.ConnectionCloseMethodHandler.methodReceived(ConnectionCloseMethodHandler.java:79)
at org.wso2.andes.client.handler.ClientMethodDispatcherImpl.dispatchConnectionClose(ClientMethodDispatcherImpl.java:192)
at org.wso2.andes.framing.amqp_0_91.ConnectionCloseBodyImpl.execute(ConnectionCloseBodyImpl.java:140)
at org.wso2.andes.client.state.AMQStateManager.methodReceived(AMQStateManager.java:111)
at org.wso2.andes.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:515)
at org.wso2.andes.client.protocol.AMQProtocolSession.methodFrameReceived(AMQProtocolSession.java:456)
at org.wso2.andes.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:96)
at org.wso2.andes.client.protocol.AMQProtocolHandler$2.run(AMQProtocolHandler.java:466)
at org.wso2.andes.pool.Job.processAll(Job.java:109)
at org.wso2.andes.pool.Job.run(Job.java:157)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
javax.jms.JMSException: Error closing connection: org.wso2.andes.client.AMQAuthenticationException: Attempt to redeclare exchange: amq.topic of type topic to null. [error code 530: not allowed]
at org.wso2.andes.client.AMQConnection.doClose(AMQConnection.java:920)
at org.wso2.andes.client.AMQConnection.close(AMQConnection.java:855)
at org.wso2.andes.client.AMQConnection.close(AMQConnection.java:846)
at org.wso2.andes.client.AMQConnection.close(AMQConnection.java:841)
at innova.esb.mediator.TopicPublisher.publishMessage(TopicPublisher.java:49)
at innova.esb.mediator.MediatorEventPublisher.mediate(MediatorEventPublisher.java:35)
at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:78)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:239)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.wso2.andes.client.AMQAuthenticationException: Attempt to redeclare exchange: amq.topic of type topic to null. [error code 530: not allowed]
at org.wso2.andes.client.handler.ConnectionCloseMethodHandler.methodReceived(ConnectionCloseMethodHandler.java:79)
at org.wso2.andes.client.handler.ClientMethodDispatcherImpl.dispatchConnectionClose(ClientMethodDispatcherImpl.java:192)
at org.wso2.andes.framing.amqp_0_91.ConnectionCloseBodyImpl.execute(ConnectionCloseBodyImpl.java:140)
at org.wso2.andes.client.state.AMQStateManager.methodReceived(AMQStateManager.java:111)
at org.wso2.andes.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:515)
at org.wso2.andes.client.protocol.AMQProtocolSession.methodFrameReceived(AMQProtocolSession.java:456)
at org.wso2.andes.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:96)
at org.wso2.andes.client.protocol.AMQProtocolHandler$2.run(AMQProtocolHandler.java:466)
at org.wso2.andes.pool.Job.processAll(Job.java:109)
at org.wso2.andes.pool.Job.run(Job.java:157)
Obviously the subscriber doesn't catch any event.
What is wrong? Why do I have this Connection Exception?
Thanks a lot.

Resources