Skip to content

Commit

Permalink
Add the method of graceful exit of consumption and the function of co…
Browse files Browse the repository at this point in the history
…nsumer retrying 3 times by default
  • Loading branch information
lymallor committed Jul 14, 2022
1 parent 9298290 commit 37f54e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consumers/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (c *Consumer) GracefulShutdown() {
select {
case <-ctx.Done():
_ = c.GetChannel().Close()
log.Fatalf("RabbitMQ consumer did not shut down after %d seconds \n", c.opt.GracefulDelay)
log.Printf("RabbitMQ consumer did not shut down after %d seconds \n", c.opt.GracefulDelay)
case <-done:
_ = c.GetChannel().Close()
}
Expand Down

0 comments on commit 37f54e6

Please sign in to comment.