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

Transaction Example #214

Open
zeconslab opened this issue Nov 26, 2024 · 1 comment
Open

Transaction Example #214

zeconslab opened this issue Nov 26, 2024 · 1 comment

Comments

@zeconslab
Copy link

zeconslab commented Nov 26, 2024

In a concept of transactionality in multiple queues and handling messages by message, is there an applicable example?

  • In the following example go gives me an error about errors in variables when I try to create an object of type MQBO
  • I need to manage cmit and back only by message, I understand that the transaction is through the queue manager but when doing rollback it rolls back in all the queues belonging to that connection, however I have carried out tests and it still rolls back in queues that do not belong to the created clients

-In summary:
I have 1 mq server with 5 queues: If I rollback in one, it is done in all 5 and I only need to handle cmit or rollback per transaction

  • MQ 9.2, GO 1.23
    code
@ibmmqmet
Copy link
Collaborator

MQ manages transaction commit/backout at the connection level. There is no way to change that.

If you want to handle different outcomes per queue, then you would also need one connection per queue. But of course, then those connections are not coordinated among themselves.

the MQBO/MQBEGIN is for when MQ is acting as a transaction coordinator, managing external XA resources such as databases. and that requires you to be running as a locally-connected, not client-connected, application. And it's probably not what you want to use anyway.

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