astifter
astifter

Reputation: 85

Is it possible for a producer to know if a message was acknowledged?

Topic says it all.

My guess is that the delivery guarantees of Pulsar make this question nonsensical but I would like to know for sure.

Upvotes: 1

Views: 714

Answers (1)

Lanayx
Lanayx

Reputation: 2876

Generally speaking, producer shouldn't know about consumer's actions - this is the whole point of introducing message brokers between two parties. Pulsar can guarantee that message will be residing in the topic until all subscriptions acknowledge it.

Saying that - to accomplish you goal you need to have a pair (producer-consumer) on each side and pair of topics, once message is consumed, another message is sent with the notification about successful consumption.

To be able to achieve guarantees that both acknowledge and sending confirmation to another topic happen together or not happen together you need to use transactional API that Pulsar provides, both those actions should happen in one transaction

Upvotes: 2

Related Questions