I have a consumer client that makes a connection to a queue on the server. That client then fails without closing the connection (or gets killed off). The client is re-started (within the connection timeout) and reconnects to the queue.
Now, I set the client id after the connection is made, and so I would expect that upon re-connecting, either for the connection to fail (as an existing connection from the same clientId exists), or the connection to re-establish the previous one for that client.
What I see is different. I see that upon restart of the client, the server now has 2 consumers associated with that queue.
That is not what I need. When I deliver messages to that queue, they get distributed amongst the consumers. The server thinks there are 2 consumes, but there is in reality only one, so half my messages go missing.
How can I either:
- ensure that the previous connection is closed when the new one is started, or
- acquire the same connection.
I don't want to just set the TTL for the consume to be a very small value.
Also, I thought the the JMS specs prevented multiple connections from the same client id
Finally, using the JMX interface and jconsole, I can't see my clientID anywhere. I know the id is set correctly, because I can add a getClientId() call in the code, and verify it is correct.
I am using BETA5 of hornetQ
Could you file a JIRA for this? Then someone will investigate