Reputation: 1906
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?
Upvotes: 5
Views: 433
Reputation: 204
Yes, the java client is thread safe, so the interaction you described should be fine.
Upvotes: 5