ActiveMQ Transport Thread is not terminated when main ends
问题 This is how I start connection: factory = new PooledConnectionFactory(brokerURL); brokerURL is "failover:(tcp://host1.com:61616,tcp://host2.com:61616)?randomize=false&jms.useAsyncSend=false&jms.dispatchAsync=false&maxReconnectAttempts=30&maxReconnectDelay=3000" Connection is started: connection = factory.createConnection("", ""); connection.start(); Application performs its usual tasks before connections gets closed: connection.close(); main method is finished, but JVM is not, because there