Skip to content

Commit ad57c45

Browse files
Merge pull request rabbitmq#126 from netqyq/master
Update worker.go
2 parents d6e20e9 + 92bcb23 commit ad57c45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ func main() {
5656
go func() {
5757
for d := range msgs {
5858
log.Printf("Received a message: %s", d.Body)
59-
d.Ack(false)
6059
dot_count := bytes.Count(d.Body, []byte("."))
6160
t := time.Duration(dot_count)
6261
time.Sleep(t * time.Second)
6362
log.Printf("Done")
63+
d.Ack(false)
6464
}
6565
}()
6666

0 commit comments

Comments
 (0)