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

Auto reconnect producer after connection errors #9

Open
thomaspeissl opened this issue Nov 29, 2022 · 0 comments
Open

Auto reconnect producer after connection errors #9

thomaspeissl opened this issue Nov 29, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@thomaspeissl
Copy link

thomaspeissl commented Nov 29, 2022

I'm running a producer.
After about 10 to 20 minutes I always receive an EOF from server error.
Can we somehow get the producer to automatically reconnect?

amqpcat -P -u amqp://user:pass@host:port/vhost -r new.contact -e synchronizer
test1
test2
ERROR - amqp.client.connection: connection closed unexpectedly: End of file reached
End of file reached (IO::EOFError)
  from /usr/share/crystal/src/gc/boehm.cr:129:5 in 'read_loop'
  from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
  from ???
test3
^C
amqpcat -P -u amqp://user:pass@host:port/vhost -r new.contact -e synchronizer
test4
test5

I'm also running a consumer.
Here I also get the EOF from server error, but I still get new messages after that so it's not an issue.

amqpcat -C -u amqp://user:pass@host:port/vhost -r new.contact -e synchronizer
test1
test2
ERROR - amqp.client.connection: connection closed unexpectedly: End of file reached
End of file reached (IO::EOFError)
  from /usr/share/crystal/src/gc/boehm.cr:129:5 in 'read_loop'
  from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
  from ???
test4
test5

As you can see test3 is missing in the consumer output.

Bildschirmfoto vom 2022-11-29 10-24-18

@dentarg dentarg added enhancement New feature or request help wanted Extra attention is needed labels Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants