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

pubsub/rabbitmq: return error if reconnect errors in Init #3198

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pubsub/rabbitmq/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ func (r *rabbitMQ) Init(_ context.Context, metadata pubsub.Metadata) error {

r.metadata = meta

r.reconnect(0)
// We do not return error on reconnect because it can cause problems if init() happens
// right at the restart window for service. So, we try it now but there is logic in the
// code to reconnect as many times as needed.
if err := r.reconnect(0); err != nil {
return err
}

return nil
}

Expand Down
Loading