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 API Support » PUT fails when queue is open???

Post new topic  Reply to topic
 PUT fails when queue is open??? « View previous topic :: View next topic » 
Author Message
MS-fan
PostPosted: Wed May 28, 2008 2:17 pm    Post subject: PUT fails when queue is open??? Reply with quote

Newbie

Joined: 28 May 2008
Posts: 2

Hi,

After struggling around for more than a month with MQ on mainframe communicating with a hand-over windows service code in C#, i have been encountering problems again lately.

The windows service starts a thread that listens to the MQ queue on the mainframe, gets the messages and stores it in an SQL Server database. This all happens inside this thread.
I have managed to take control back from MQ's GET method, when i try to stop the service by setting the waitinterval to everything except -1. Don't ask me how long it took me to figure out that control was lost when GET was busy with waitinterval -1. Thank God there was internet.

For efficiency i thought it was ridiculous to open and close/disconnect MQ in my listener thread all the time...so i open everything 1 time and keep listening for messages.
Now when we try to place messages on the queue, the mainframe complains that the queue is being used(???). We stopped the service and managed to PUT the messages from the mainframe.

Now my question:
Is there any way to open the queue in shared mode for getting messages and not have MQ locking the queue? Is MQ designed this way that if someone is listening on the queue, no other one can PUT something on the queue???...since it is a queue, it should work in a FIFO way and last message would be at the end of the queue..so why listening for messages can disturb the process of PUT?

I think IBM need to update their MQ programming references, because i see methods in the hand-over code that are not even described in it, while the code still compiles. Also those error reason codes and compcodes might need some good description as well. Without internet you don't even know what those reasoncodes mean.

I am using C# with MQSeries 6.0.

Sorry for getting frustated with MQ usage...but everytime i feel i am at the end of my work, then MQ surprises me with some unexpected error/problem again, getting me back to the start...just a real pain in da butt (sigh)
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 28, 2008 3:08 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I think you will love having the manuals at hand as you seem to be doing the work without them:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp

Have special care to the .NET manual and the programer's manual and reference.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
David.Partridge
PostPosted: Wed May 28, 2008 11:32 pm    Post subject: Reply with quote

Master

Joined: 28 Jun 2001
Posts: 249

Don't open the queue in exclusive mode, if you do use exclusive mode, then you will see the problem you describe.
_________________
Cheers,
David C. Partridge
Back to top
View user's profile Send private message
MS-fan
PostPosted: Thu May 29, 2008 2:52 am    Post subject: Reply with quote

Newbie

Joined: 28 May 2008
Posts: 2

Thanks.

The queue is opened with the following options:

openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_ALTERNATE_USER_AUTHORITY | MQC.MQOO_INQUIRE;

The GET is done with

gmo = new MQGetMessageOptions();
gmo.Options = MQC.MQGMO_WAIT | MQC.MQGMO_FAIL_IF_QUIESCING;
gmo.WaitInterval = 8;

I don't think i am using excluded mode
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 29, 2008 2:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Sure that's for the get. What about the put? and what about the qdef?


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » PUT fails when queue is open???
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.