Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect reconnect logic when STOMP connection fails #36

Open
PaulGale opened this issue Jul 29, 2013 · 0 comments
Open

Incorrect reconnect logic when STOMP connection fails #36

PaulGale opened this issue Jul 29, 2013 · 0 comments

Comments

@PaulGale
Copy link

If the STOMP gem throws an exception for some reason during its normal operation the Stomp adapter doesn't deal with it appropriately.

The adapter attempts to reconnect immediately by issuing a CONNECT frame. ActiveMQ rejects this CONNECT request as it believes the client is still connected, which is indeed the case. Exceptions appear in the ActiveMQ logs that state that the client is already connected. As ActiveMQ doesn't honor the CONNECT request ActiveMessaging becomes confused and gets wedged into an endless loop of sending CONNECT requests.

What ActiveMessaging should do in response to an exception from the STOMP gem is to close the connection and create a new one. This would, at the very least, cause the underlying socket to be closed causing ActiveMQ to see that the client has gone.

After creating a new Stomp connection object ActiveMessaging can then go through its reconnect logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant