Skip to content
New issue

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

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

Already on GitHub? # to your account

Infinite loop on AMQP disconnect #1015

Open
canni opened this issue Feb 10, 2024 · 3 comments
Open

Infinite loop on AMQP disconnect #1015

canni opened this issue Feb 10, 2024 · 3 comments

Comments

@canni
Copy link

canni commented Feb 10, 2024

Currently there's no way to prevent infinite loop here:

cecontext.LoggerFrom(ctx).Warn("Error while receiving a message: ", err)

In my case if my connection to AMQP broker dies the continue statement a line below the mentioned above just spins the loop indefinitely.

(My broker is RabbitMQ + AMQP 1.0 plugin)

@embano1
Copy link
Member

embano1 commented Feb 10, 2024

Interesting, so this is not covered by io.EOF it seems. Do you see the error/error type thrown that we could assert on?

@canni
Copy link
Author

canni commented Feb 10, 2024

Here's an error string from my logs:
Error while receiving a message: *Error{Condition: amqp:internal-error, Description: Connection forced: ... (Shortened output)

@canni
Copy link
Author

canni commented Feb 10, 2024

After a bit more digging, this in the error returned: https://github.com/Azure/go-amqp/blob/v0.17.0/errors.go#L14
It might be a buggy AMQP1 impl from Rabbit's plugin perspective, but IMO InternalErr from AMQP client shouldn't continue processing :)

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

No branches or pull requests

2 participants