Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Pulsar - acknowledge from different thread

I've spun up a Pulsar Java consumer in thread T1 and I'm handing over the messages for processing to thread T2.

Is it safe to acknowledge messages from T2? Specifically, is calling consumer.acknowledge(messageId) on the instance shared between two threads ok?

like image 608
David Siro Avatar asked Jun 26 '18 06:06

David Siro


1 Answers

Yes, the java client is thread safe, so the interaction you described should be fine.

like image 63
Ivan Kelly Avatar answered Oct 18 '22 00:10

Ivan Kelly