Receiving acknowledgements of successful messages via QueueMessage

15 views
Skip to first unread message

dh...@udacity.com

unread,
Oct 3, 2014, 6:55:49 PM10/3/14
to sarama...@googlegroups.com
Hi all,

I have the following question that I'd love your help on.

I'm reading messages from a queue and I want to send them to Kafka. After I read a message, I want to delete it from the queue (but only if Kafka received it). The thing I'm unsure of is this:

How do I know if a message got received by Kafka after sending it using QueueMesssage ? I know I could use SendMessage but then I get blocked every time and that kind of sucks. I also know when a message doesn't send via the errors channel, but what about successes?

Thank you so much for your help!
Dhruv

Evan Huus

unread,
Oct 3, 2014, 10:46:57 PM10/3/14
to sarama...@googlegroups.com
Hi Dhruv,

If it *doesn't* get delivered, you will get an error on the Errors
channel [1]. There is currently no way to get an acknowledgement when
messages *are* delivered, but there is a new producer design being
experimented with which does provide this feature [2]. It's not
necessarily production-quality yet, but it's more than ready for
testing and we hope to have it merged eventually (I've been rather
short on time to work on it recently). If you have any feedback please
let us know.

Cheers,
Evan

[1] http://godoc.org/github.com/Shopify/sarama#Producer.Errors
[2] https://github.com/Shopify/sarama/pull/132
Reply all
Reply to author
Forward
0 new messages