SolaceProducts / solace-spring-cloud

An umbrella project containing all Solace projects for Spring Cloud
Apache License 2.0
20 stars 14 forks source link

DATAGO-76828: add transacted producer support #294

Closed Nephery closed 2 months ago

carolmorneau commented 3 months ago

I know we have said yesterday that the transacted feature is independent from the batching feature, but, as it is, it doesn't look like the transacted feature is of any use unless batching is also used. Does that sound accurate?

Was the use of transactions in SERIAL mode considered? The producer would accumulate messages within a transaction and eventually commit when a number is reached? That is of course more work to implement and brings in challenges like committing partial transactions after some timeout.... but would make the transacted feature potentially useful to apps not using batching?

If we stick to the current design, this PR looks good though.

Nephery commented 3 months ago

@carolmorneau

but, as it is, it doesn't look like the transacted feature is of any use unless batching is also used. Does that sound accurate?

Yep, exactly. This PR is just to get the groundwork in for transaction support. It will only really be useful once I add support for batched messages (coming soon in a new PR).

Was the use of transactions in SERIAL mode considered? The producer would accumulate messages within a transaction and eventually commit when a number is reached? That is of course more work to implement and brings in challenges like committing partial transactions after some timeout.... but would make the transacted feature potentially useful to apps not using batching?

Yeah, adding a config option to this would be ideal. But its a future consideration, since we don't need it right at this very moment.