nsqio / go-nsq

The official Go package for NSQ
MIT License
2.59k stars 444 forks source link

producer.PublishAsync - Not working as expected #370

Closed wlbwlbwlb closed 1 month ago

wlbwlbwlb commented 1 month ago

I posted 10,000 messages but only processed 7,368 of them

        count := 10000
    for i := 0; i < count; i++ {
        messageBody := []byte("hello")
        topicName := "topic7"
        err = producer.PublishAsync(topicName, messageBody, nil)
        if err != nil {
            fmt.Println(err)
        }
    }

image

mreiferson commented 1 month ago

Going to need more logs to figure out what your consumers are doing, but my guess would be they're not FIN (finishing) the messages and thus are "stuck" because nsqd won't send them any more messages.