Skip to content

Commit 971b6bf

Browse files
authored
fix: rabbitmq publish acknowledgement bug fixed (#189)
1 parent 9d520ac commit 971b6bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

task_queue/remote_task_queue.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ func (r *remoteTaskQueue) EnqueueTask(queueName string, argument ArgumentType) e
8282
)
8383
if err != nil {
8484
log.Println("error while publishing message to queue [" + queueName + "]")
85+
log.Println(err.Error())
8586
return errors.New("error while publishing message to queue")
8687
}
8788
// Check acknowledgement
88-
ack := dConfirmation.Acked()
89+
ack := dConfirmation.Wait()
8990
if !ack {
90-
log.Println("error while publishing message to queue [" + queueName + "]")
91+
log.Println("error while publishing message to queue [" + queueName + "] publish ack > false")
9192
return errors.New("error while publishing message to queue")
9293
}
9394
return nil

0 commit comments

Comments
 (0)