Atomikos Forum |
|
Hey all,
I’m currently facing a problem while trying to use atomiko's MessageConsumerSession and consuming JMS messages from Activemq broker. Problem is when my broker stops listening(in case of host death, power off. etc.). Logs are full of: 11-02-15 13:14:52,469 [Thread-50] MessageConsumerSession: Error in JMS thread com.atomikos.jms.AtomikosJMSException: Failed to grow the connection pool at com.atomikos.jms.AtomikosJMSException.throwAtomikosJMSException(AtomikosJMSException.java:54) at com.atomikos.jms.AtomikosConnectionFactoryBean.throwAtomikosJMSException(AtomikosConnectionFactoryBean.java:171) at com.atomikos.jms.AtomikosConnectionFactoryBean.createConnection(AtomikosConnectionFactoryBean.java:587) at com.atomikos.jms.extra.MessageConsumerSession$ReceiverThread.refreshJmsResources(MessageConsumerSession.java:393) at com.atomikos.jms.extra.MessageConsumerSession$ReceiverThread.run(MessageConsumerSession.java:507) Caused by: com.atomikos.datasource.pool.CreateConnectionException: error creating JMS connection at com.atomikos.jms.AtomikosJmsXAConnectionFactory.createPooledConnection(AtomikosJmsXAConnectionFactory.java:61) at com.atomikos.datasource.pool.ConnectionPool.growPool(ConnectionPool.java:190) at com.atomikos.datasource.pool.ConnectionPool.borrowConnection(ConnectionPool.java:143) at com.atomikos.jms.AtomikosConnectionFactoryBean.createConnection(AtomikosConnectionFactoryBean.java:585) ... 2 more Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://10.10.10.230:61616. Reason: java.net.ConnectException: Connection refused at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35) at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286) at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230) at org.apache.activemq.ActiveMQXAConnectionFactory.createXAConnection(ActiveMQXAConnectionFactory.java:59) at com.atomikos.jms.AtomikosJmsXAConnectionFactory.createPooledConnection(AtomikosJmsXAConnectionFactory.java:58) ... 5 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:484) at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:447) at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53) at org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:127) at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58) at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72) at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58) at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58) at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266) ... 8 more As if this were not enough, atomiko's tm.out log file growing extremly fast(10MB per few seconds), what is highly unacceptable in my case. My question is: Would it be possible to implement such a exponential backoff mechanism when creating a new connection via MessageConsumerSession to avoid this? If not, how can I fix it? Best Regards, Mariusz Rutkowski
My jta.properties:
com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory com.atomikos.icatch.log_base_dir=/tmp/work com.atomikos.icatch.output_dir=/tmp/work com.atomikos.icatch.console_log_level=WARN com.atomikos.icatch.max_actives=500 com.atomikos.icatch.console_file_limit=0 com.atomikos.icatch.default_jta_timeout=100000 com.atomikos.icatch.enable_logging=true |