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 » Restrict number of input/output process on local queue

Post new topic  Reply to topic
 Restrict number of input/output process on local queue « View previous topic :: View next topic » 
Author Message
sc
PostPosted: Wed Mar 17, 2004 2:30 pm    Post subject: Restrict number of input/output process on local queue Reply with quote

Novice

Joined: 06 Sep 2003
Posts: 16

We like to restrict the number of process which open a local queue to do input/output. The reason is that we like to dequeue and process the messages in the strict order, one finished, then anthoer. And if someone accidently started another dequeue process, that could mess up the message order.

Can we config some parameters to do that?

Or is there better way?

Thanks.
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Mar 17, 2004 2:55 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

No, but you can use MQOO_OPEN_EXCLUSIVE. Or set DEFSOPT(EXCL) on the Queue and hope nobody overrides it programmatically.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Wed Mar 17, 2004 3:03 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Sorry to butt in...

The first thing you need to get between the ears when using messaging is to get rid of message affinity (i.e. order of message processing dependency)!
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PeterPotkay
PostPosted: Wed Mar 17, 2004 5:28 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Eddie, if you set the queue attribute, the programmer will not be able to overide it.

Quote:

This indicates whether the queue can be opened for input multiple times concurrently. The value is one of the following:


MQQA_SHAREABLE
Queue is shareable.
Multiple opens with the MQOO_INPUT_SHARED option are allowed.


MQQA_NOT_SHAREABLE
Queue is not shareable.
An MQOPEN call with the MQOO_INPUT_SHARED option is treated as MQOO_INPUT_EXCLUSIVE.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
kman
PostPosted: Thu Mar 18, 2004 12:17 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2003
Posts: 309
Location: Kuala Lumpur, Malaysia

If you open exclusive, isn't that the same as having just one instance of the application for the queue? Or one appp per queue?

And if message affinity is so important, you can't have more than an instance of the applicaiton serving the queue anyway.. because that would 'mess up' the order.
Back to top
View user's profile Send private message Yahoo Messenger
gunter
PostPosted: Thu Mar 18, 2004 12:28 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

When the process ends and the queue is opened excliusive, close the queue in any circumstance, otherwise you have to wait until qmgr has freed the handle.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Mar 18, 2004 7:52 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Oooops.

That's the problem every time I see an option that includes 'AS_Q_DEF', I assume that it can be overridden.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Mar 18, 2004 7:56 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

There are actually 2 parameters of the queue that relate here:


Quote:

DefInputOpenOption (MQLONG)
Default input open option.


Local Model Alias Remote Cluster
Yes Yes No No No


This is the default way in which the queue should be opened for input. It applies if the MQOO_INPUT_AS_Q_DEF option is specified on the MQOPEN call when the queue is opened. The value is one of the following:


MQOO_INPUT_EXCLUSIVE
Open queue to get messages with exclusive access.
The queue is opened for use with subsequent MQGET calls. The call fails with reason code MQRC_OBJECT_IN_USE if the queue is currently open by this or another application for input of any type (MQOO_INPUT_SHARED or MQOO_INPUT_EXCLUSIVE).


MQOO_INPUT_SHARED
Open queue to get messages with shared access.
The queue is opened for use with subsequent MQGET calls. The call can succeed if the queue is currently open by this or another application with MQOO_INPUT_SHARED, but fails with reason code MQRC_OBJECT_IN_USE if the queue is currently open with MQOO_INPUT_EXCLUSIVE.



Quote:

Shareability (MQLONG)
Whether queue can be shared for input.


Local Model Alias Remote Cluster
Yes Yes No No No


This indicates whether the queue can be opened for input multiple times concurrently. The value is one of the following:


MQQA_SHAREABLE
Queue is shareable.
Multiple opens with the MQOO_INPUT_SHARED option are allowed.


MQQA_NOT_SHAREABLE
Queue is not shareable.
An MQOPEN call with the MQOO_INPUT_SHARED option is treated as MQOO_INPUT_EXCLUSIVE.

To determine the value of this attribute, use the MQIA_SHAREABILITY selector with the MQINQ call.


In the original posters scenario, the MQAdmin can control things by setting Shareability.
_________________
Peter Potkay
Keep Calm and MQ On
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 » General IBM MQ Support » Restrict number of input/output process on local queue
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.