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

Check rabbitmq connection status and reconnect when disconnected #55

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

film42
Copy link
Contributor

@film42 film42 commented Aug 24, 2021

The underlying client should be good about reconnecting, but we are
seeing behavior where a runtime (in this case JRuby) is using a lot of
mem and then fails to disconnect despite every other connection
(thousands of others) working just fine. Perhaps it's safer to reconnect
and let the publishers figure it out?

Right now we see:

com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: java.io.EOFException

This is called when the in-mem publisher tries to create a new channel
(when a consumer thread is created).

TODO: Will this potentially leak a connection? Should we explicitly
disconnect the old connection?

The underlying client should be good about reconnecting, but we are
seeing behavior where a runtime (in this case JRuby) is using a lot of
mem and then fails to disconnect despite every other connection
(thousands of others) working just fine. Perhaps it's safer to reconnect
and let the publishers figure it out?

Right now we see:

```
com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: java.io.EOFException
```

This is called when the in-mem publisher tries to create a new channel
(when a consumer thread is created).

TODO: Will this potentially leak a connection? Should we explicitly
disconnect the old connection?
@ETetzlaff
Copy link
Contributor

LGTM

@newellista
Copy link

I like it. :shipit:

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

Successfully merging this pull request may close these issues.

3 participants