ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Simulate IBM MQ queue fail

Post new topic  Reply to topic
 Simulate IBM MQ queue fail « View previous topic :: View next topic » 
Author Message
sorin
PostPosted: Thu Mar 24, 2022 6:22 am    Post subject: Simulate IBM MQ queue fail Reply with quote

Newbie

Joined: 24 Mar 2022
Posts: 3

Hello everyone,

There is an app I'm trying to test which moves messages from an IBM MQ queue to a queue from Azure Service Bus. What I want to test is what would happen if something breaks on the IBM MQ side and no queue is accessible anymore while my app is writing a message on that queue. I don't have any direct access to IBM MQ queues so I tried to do something using Java.

After some digging I found that a way to disable the queue is using setInhibitPut()/setInhibitGet() on the queue I'm interested in. However I realized that doing that the message isn't really lost when I'm trying to send it on a disabled queue. And after some more reading it seems that when you create remote connection to a queue, the queue manager uses a transmission queue. So if the queue is disabled, the message will remain on the transmission queue until the destination queue becames available.

Is it a way to do a workaround for this? My only way to communicate with the IBM MQ queues is through Java (I don't have access to WebSphere MQ or anything like that and the queues are created/maintained by a 3rd party from the point of view of my team).

Thanks,
Sorin
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Mar 24, 2022 7:59 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

MQ cannot lose that which it never had - in other words, if you cannot put the message on the queue, e.g., Queue Full, Queue Manager unavailable, Queue Manager quiescing, then the message is not lost because it never existed.

If you want to test for the various states and Reason codes you would get in these circumstances, you can download the developers edition of MQ and test against it in isolation of your third party.

NOTE:
You'll need to create an IBM ID to download the developers edition.

LINKS:
IBM MQ Downloads for developers
IBM MQ Queue Manager Docker Image
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
sorin
PostPosted: Thu Mar 24, 2022 8:40 am    Post subject: Reply with quote

Newbie

Joined: 24 Mar 2022
Posts: 3

Thank you for your response.

The app I was talking about goes both ways. So it also takes messages from Azure Service Bus and writes them on IBM MQ. So my concern is that when there is a problem on IBM MQ side, the message may get lost (deleted by the app from Azure Service Bus and NOT added to the IBM MQ queue). I did the same thing in the case of writing to Azure Service Bus where I disabled the ASB queue.
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Mar 24, 2022 11:32 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

The scenario you state is covered by transactionality surely?

I would expect that the message you pull from Azure Service Bus (is that the new name for MSMQ?) would not be deleted until you got a zero return code response from MQ. Going from MQ I would expect that the GET would be within a unit of work, and if there's a non-zero return code (or whatever the ASB equivalent is) then the message would be rolled back.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
sorin
PostPosted: Thu Mar 24, 2022 11:16 pm    Post subject: Reply with quote

Newbie

Joined: 24 Mar 2022
Posts: 3

Well this is what I'm trying to test. From what I see in the code, it is first done a non-destructive read from Azure Service Bus, it tries to write on IBM MQ and if there is no exception the message is removed from Azure Service Bus. This is done in multiple steps and I want to be sure that it works properly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Simulate IBM MQ queue fail
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.