Skip to content

Incorrect reconnect logic when STOMP connection fails #36

@PaulGale

Description

@PaulGale

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions