You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering whether it is technically possible to send a transaction ID over the network to another service, and for that service to then also publish messages as part of the same transaction. The transaction would be committed by the service that initially created it.
The java client doesn't seem to support creating a TransactionImpl from a transaction ID (at least without reflection), but from what I understand the broker should end up with the same transaction coordinator, since the ID for that is just derived from the most significant bits of the transaction ID. All the methods in TransactionMetadataStoreService also seem to use either of the two ID's.
My use case for this is that I would like multiple services to be able to each produce some events, and either all or none of those events to be committed. I could get around this, for example by routing all the events to a single service and using a transaction there, but I figured this might be simpler if it could work.
Is there anything that would stop me from doing this? I don't mind using a little reflection to get there, but maybe it would even be a nice feature to include in the client API.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone!
I was wondering whether it is technically possible to send a transaction ID over the network to another service, and for that service to then also publish messages as part of the same transaction. The transaction would be committed by the service that initially created it.
The java client doesn't seem to support creating a
TransactionImpl
from a transaction ID (at least without reflection), but from what I understand the broker should end up with the same transaction coordinator, since the ID for that is just derived from the most significant bits of the transaction ID. All the methods inTransactionMetadataStoreService
also seem to use either of the two ID's.My use case for this is that I would like multiple services to be able to each produce some events, and either all or none of those events to be committed. I could get around this, for example by routing all the events to a single service and using a transaction there, but I figured this might be simpler if it could work.
Is there anything that would stop me from doing this? I don't mind using a little reflection to get there, but maybe it would even be a nice feature to include in the client API.
Beta Was this translation helpful? Give feedback.
All reactions