Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
-
None
Description
We have the following scenario:
- We have configured the ActiveMQ Camel component to use the connectionfactory that is supplied as a OSGI service from activemq-broker.xml
- We have defined a route which reads from a topic as a durable subscriber (attached as XML file)
- We deploy the route as an XML file in the deploy folder
- We start the route and have established a connection to ActiveMQ
- We stop the route and the connection to ActiveMQ is still registered as can be seen in the MBean tab of JConsole.
- We start the route and we find an exception in the log file that we cannot connect because of another connection that is already established.
The exception we find:
12:00:30,787 | WARN | /127.0.0.1:50236 | TransportConnection | ivemq.broker.TransportConnection 699 | 46 - org.apache.activemq.activemq-core - 5.4.1.fuse-01-00 | Failed to add Connection
javax.jms.InvalidClientIDException: Broker: default - Client: conn01 already connected from /127.0.0.1:50205
at org.apache.activemq.broker.region.RegionBroker.addConnection(RegionBroker.java:243)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:78)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:85)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:696)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:83)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:137)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:311)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:228)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:220)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:202)[46:org.apache.activemq.activemq-core:5.4.1.fuse-01-00]
at java.lang.Thread.run(Thread.java:680)[:1.6.0_22]
12:00:30,789 | WARN | tenerContainer-1 | DefaultMessageListenerContainer | .DefaultMessageListenerContainer 875 | 80 - org.springframework.jms - 3.0.3.RELEASE | Could not refresh JMS Connection for destination 'CentraleTopic' - retrying in 5000 ms. Cause: Broker: default - Client: conn01 already connected from /127.0.0.1:50205
When we remove the connection through JMX then we are able to connect again.