Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubts about transactions #215

Open
zeconslab opened this issue Dec 5, 2024 · 1 comment
Open

Doubts about transactions #215

zeconslab opened this issue Dec 5, 2024 · 1 comment

Comments

@zeconslab
Copy link

zeconslab commented Dec 5, 2024

Is there any focus on transactions within the examples?

I have researched and I understand that to use the approach it is necessary to create several connections (I have no problem with this), what happens is that when creating different clients and opening the queues, at the time of performing a rollback in 1 queue it ends up affecting the other queues

Does anyone have a solution or example that can help me understand better?

  • MQ 9.2, GO 1.23
@ibmmqmet
Copy link
Collaborator

ibmmqmet commented Dec 5, 2024

https://www.ibm.com/docs/en/ibm-mq/9.4?topic=queuing-committing-backing-out-units-work is documentation describing MQ's transaction models. It's essentially the same regardless of application language. As I said before, local (one-phase) transactions are scoped to the hConn.

XA, two-phase, transactions have further rules on who can participate and how.

In this repo, the amqsbo.go sample is one that does some work with transactions. And in the MQ product itself, you'll find a bunch of samples in different languages that use MQCMIT/MQBACK or equivalent. Since the model is the same, it would be trivial to apply that knowledge to a Go program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants