Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

Commit

Permalink
Reconnect when Ack or Reject failure to avoid infinite loop on forwar…
Browse files Browse the repository at this point in the history
…ding messages already in channel (#21)
  • Loading branch information
Filip Haftek authored Nov 7, 2017
1 parent a60ce6a commit 0668679
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rabbitmq/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func (c Consumer) startForwarding(params *workerParams) error {
log.WithFields(log.Fields{
"forwarderName": forwarderName,
"error": err.Error()}).Error("Could not reject message")
return err
}

} else {
Expand All @@ -175,6 +176,7 @@ func (c Consumer) startForwarding(params *workerParams) error {
"forwarderName": forwarderName,
"error": err.Error(),
"messageID": d.MessageId}).Error("Could not ack message")
return err
}
}
case <-params.check:
Expand Down

0 comments on commit 0668679

Please sign in to comment.