Description
When ActiveMQConnection.reconnect() is called after the transport channel is reconnected, sendConnectionInfoToBroker() is called to reinitialise the connection with the broker. This method checks if the connection info has already been sent by checking isConnectionInfoSentToBroker and silently avoid sending the information is the flag i set. This means that the connection won't be initialised correctly and no messages will be delivered to the connection.
The problem can be solved by adding
isConnectionInfoSentToBroker = false;
before
sendConnectionInfoToBroker();
in doReconnect().
The problem can be reproduces by starting a broker and a consumer with a reliable tcp connection, kill and restart the broker and then send some messages to the consumer (they won't be correctly dispatched).