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 » General IBM MQ Support » Browsing message from IBM MQ - output hold/inhibited

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 Browsing message from IBM MQ - output hold/inhibited « View previous topic :: View next topic » 
Author Message
wilfred
PostPosted: Wed May 11, 2016 12:38 pm    Post subject: Browsing message from IBM MQ - output hold/inhibited Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

Hello All,
I am kind of new to IBM MQ management. I have 2 queries. I request you to kindly throw some light on them.

1. Is it possible to read/browse/Get message from a Queue, which is inhibited/Output set on hold?
Please give me a sample java code to do it.

2. How to handle the above scenario in an application where an related MDB is running and we do not want the MDB to consume the same message being read/browsed.

Please give your inputs. I will be very thankful.

Thanks.
Back to top
View user's profile Send private message
hughson
PostPosted: Wed May 11, 2016 2:02 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1959
Location: Bay of Plenty, New Zealand

Hi Wilfred,

Welcome to the MQ forum.

I'm not sure if I'm understanding exactly what you meant by "output set on hold" but I'm going to answer your question assuming you mean GET(DISABLED). If that's not what you meant, please post another comment and I'll try to understand better.

If a QLOCAL is set to GET(DISABLED) there is no way around that. You cannot successfully browse or get messages from that queue.

However, you can stop one application from getting from a queue (for example your MDB) while another application can get, by using alias queues.

If the queue your MDB was configured to use was a QALIAS that pointed at your QLOCAL, then the QALIAS could be set to GET(DISABLED) whilst the QLOCAL was still GET(ENABLED) therefore allowing you to take a look at the messages without the MDB getting in there at the same time.

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
wilfred
PostPosted: Wed May 11, 2016 10:59 pm    Post subject: Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

Hi Hughson,
Thanks a lot for your reply.

Yes, your were right about the point GET(DISABLED) on the Queue.

I really appreciate your suggestion here Hughson. But we have a limitation in our application. We cannot make use of an QALIAS option due to other client specific reasons.

You also rightly mentioned about the requirement that the MDB should not be able to access this queue during my browse process.

Can we not have some kind of LOCK on the QLOCAL queue during the browse process so that the MDB designed for this queue does not process it during my GET activity?

Thanks,
Wilfred.
Back to top
View user's profile Send private message
hughson
PostPosted: Thu May 12, 2016 2:01 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1959
Location: Bay of Plenty, New Zealand

You can make use of MQOO_INPUT_EXCLUSIVE but that does leave you battling with the MDB to get that lock. If the MDB already has the queue open, you can't get the exclusive lock. is it not possible to stop the MDB running?

I cannot imagine what your reasons for being unable to use alias queues are. It is rare for an application to care.

Could you elaborate on the problem you are trying to solve? Perhaps there are other solutions this group can offer that don't require you locking out the MDB.

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
wilfred
PostPosted: Thu May 12, 2016 2:54 am    Post subject: Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

Hi Hughson,

Yes, Please find the below problem I am trying to resolve.

1. There are 300+ QLOCALs queues existing in the IBM MQ configured for this application.
2. All these are also accessible through the application through a GUI. Which simply means, an end user of the app will be able to see list of Queues in his web page.
3. As per the requirement, after the user post a message to a particular queue, he/she should be able to browse it before the MDB processes it.
4. Since the MDB's are also configured and running in the server, the user is provided with a UI feature to put a output hold (Get disabled) on a particular queue.
5. The user will browse the message, and then release the output hold (GET enabled) so that the same can be processed by the MDB.
6. In the current code, during the time the user browses the message, programmatically the GET is enabled and disabled.
7. Within this small fraction of a second, the MDB starts processing this message and the message is removed from the queue. Which the User does not want this to happen.
8. In short the user wants to have the control on the messages as explained above.

To answer your question regarding alias queue:
We have around 300+ queues. The client will not accept to create alias queues for all of them.

Hughson, Please let me know if you have any further clarifications required on the above points.

Thanks,
Wilfred
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 12, 2016 4:12 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

wilfred wrote:
3. As per the requirement, after the user post a message to a particular queue, he/she should be able to browse it before the MDB processes it.


The MDB will process it immediately.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 12, 2016 5:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

wilfred wrote:
Please find the below problem I am trying to resolve.


The problem is your design is trying to use MQ as a workflow and it just isn't a workflow solution. It's messaging software.

The user performs some kind of process which results in a message on a queue, which then needs to be reviewed by the same or a different user before being released for processing. That's a workflow process. MQ is intended, designed and written to move messages and make them available as fast as possible. So once they've been committed to the queue, MQ believes that they are to be processed and presents them to the first authorized process that asks for them.

What you need is to write the messages to a separate queue and for this GUI to move them to the queue the MDB is processing once the user indicates he's reviewed the message and is happy with it.

This is going to be less popular that using alias queues.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
wilfred
PostPosted: Thu May 12, 2016 8:09 am    Post subject: Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

Vitor wrote:
wilfred wrote:
Please find the below problem I am trying to resolve.


What you need is to write the messages to a separate queue and for this GUI to move them to the queue the MDB is processing once the user indicates he's reviewed the message and is happy with it.

This is going to be less popular that using alias queues.


Thanks Vitor.
This verification process is not mandatory. If the user feels he/she needs to verify, the option will be given to them. So I do not consider this like a workflow. It may not be technically possible, but the requirement is very simple. "The user will want to browse a message in MQ which is already configured for an MDB"

One strange point I would like to mention here is, This specific requirement or the scenario is working perfectly fine in an legacy environment where the IBM MQ version is 7.0, EJB 2.x, Weblogic 10 combination. Today we have migrated the same application to IBM MQ 7.5, EJB 3.2 and Weblogic 12.1.3. Application is not working as expected on this new STACK.

Thanks and Regards,
Wilfred.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 12, 2016 8:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

wilfred wrote:
"The user will want to browse a message in MQ which is already configured for an MDB"

The user will have to stop the MDB.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 12, 2016 9:23 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

wilfred wrote:
This specific requirement or the scenario is working perfectly fine in an legacy environment where the IBM MQ version is 7.0, EJB 2.x, Weblogic 10 combination.


It shouldn't be. There's certainly no changes in this very basic MQ behavior between 7.0 & 7.5.

wilfred wrote:
This verification process is not mandatory. If the user feels he/she needs to verify, the option will be given to them.


So what do you do if the message is put to a near-empty queue and then a few moments later (overcome with uncertainty) the user feels they need to verify it? The MDB has almost certainly already consumed the message so it can't be browsed because it's just plain gone.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu May 12, 2016 9:35 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Perhaps the message should be put to the queue in a UofW, but not committed until the user verifies it.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 12, 2016 10:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bruce2359 wrote:
Perhaps the message should be put to the queue in a UofW, but not committed until the user verifies it.


Can you browse an uncommitted message? From an application separate to the one doing the put?

How is this working under v7.0?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu May 12, 2016 11:33 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

My rejected Request For Enhancement to allow at least MQ Administrators to browse a Get Inhibited queue

http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=42656

I suppose you can still cast votes for rejected RFEs.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu May 12, 2016 11:41 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Vitor wrote:
bruce2359 wrote:
Perhaps the message should be put to the queue in a UofW, but not committed until the user verifies it.


Can you browse an uncommitted message? From an application separate to the one doing the put?

How is this working under v7.0?

The OP is not very clear about which bean is doing what.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
wilfred
PostPosted: Thu May 12, 2016 11:58 am    Post subject: Reply with quote

Novice

Joined: 11 May 2016
Posts: 12

Hi All,
I thank all of you for thinking through this issue i am facing.

I just want to know if I can get this resolved with the options we have in hand.

Can one of you let me know the usage of MQGMO_LOCK and MQC.MQOO_INPUT_EXCLUSIVE. Can one of these help me in this case?

Can I paste the code here to see if we can integrate one of these?

Regards,
Rajan.S
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » General IBM MQ Support » Browsing message from IBM MQ - output hold/inhibited
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.