Skip to content

Commit

Permalink
fix listen queue logic, to also clear temporary queue after purge
Browse files Browse the repository at this point in the history
  • Loading branch information
alileza committed Jul 30, 2018
1 parent 4e70918 commit ecfe0ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resource/queue/rabbitmq/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ func (c *rabbitMQ) Listen(target string) error {
if _, err := ch.QueuePurge(q.Name, false); err != nil {
return err
}
if _, ok := c.consumedMessage[target]; ok {
c.consumedMessage[target] = make([][]byte, 0)
}

msgs, err := consume(ch, q.Name)
if err != nil {
Expand Down

0 comments on commit ecfe0ea

Please sign in to comment.