Open rkrishn7 opened 3 months ago
@FlorentinDUBOIS Tagging you for visibility. I know this is a lot so no rush here!
Bumping and tagging some additional folks - @freeznet @bewaremypower
I'm going to review this PR soon.
Thanks you @rkrishn7, I will take a look at this pull request and test it in production next week. Sorry for the delay for my answer
Should these changes be gated behind a feature flag?
I don't think so.
This change likely has implications when buffering in the producer. Thoughts on how we should handle that?
Sorry I don't get it. It only registers the partition with the transaction id via the ADD_PARTITION_TO_TXN
command before adding the message to the buffer. It's necessary for transactional messages and has no impact on the regular send without transaction.
Should these changes be gated behind a feature flag?
I don't think so.
👍🏾
This change likely has implications when buffering in the producer. Thoughts on how we should handle that?
Sorry I don't get it. It only registers the partition with the transaction id via the
ADD_PARTITION_TO_TXN
command before adding the message to the buffer. It's necessary for transactional messages and has no impact on the regular send without transaction.
Sorry! To clarify, I think there's a potential footgun lurking here. For example:
Let's say we've enabled transactions and start producing transactional messages with a batching producer. If we haven't hit the batching threshold before the transaction's timeout, then all those buffered messages will fail to be produced. This is subtle, but definitely seems undesirable.
It seems like either transactional messages should bypass batching or we should warn the user if both transactions and batching are enabled.
This PR adds client support for Pulsar Transactions.
Resolves #253
Notes:
Open Questions:
Transaction
API uses internal synchronization to provide a "no mut" public interface. Are there any alternative approaches that may be better?