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 » multiple message dequeue

Post new topic  Reply to topic
 multiple message dequeue « View previous topic :: View next topic » 
Author Message
technabber
PostPosted: Wed Jul 02, 2008 1:03 pm    Post subject: multiple message dequeue Reply with quote

Newbie

Joined: 02 Jul 2008
Posts: 6

Hi,

I am new to MQ and have been having difficulty finding any information on the web about the issues I need to address. I hope someone will be gracious enough to help.

We have a 10,000 message MQ that we are trying to read from. The messages get put on the queue at a very fast rate (it can be filled in less than a minute). We need to read the messages as fast as they get put on, but the com.ibm.mq package seems to take anywhere from 50 to 500 milliseconds to read one message. This isn't fast enough for us.

Is there any way to dequeue multiple messages at one time instead of requesting one message at a time? If not, can you recommend a good way to get messages off the queue in the fastest way possible?

Thank you in advance for your help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 02, 2008 1:39 pm    Post subject: Re: multiple message dequeue Reply with quote

Grand High Poobah

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

technabber wrote:
Hi,

I am new to MQ and have been having difficulty finding any information on the web about the issues I need to address. I hope someone will be gracious enough to help.

We have a 10,000 message MQ that we are trying to read from. The messages get put on the queue at a very fast rate (it can be filled in less than a minute). We need to read the messages as fast as they get put on, but the com.ibm.mq package seems to take anywhere from 50 to 500 milliseconds to read one message. This isn't fast enough for us.

Is there any way to dequeue multiple messages at one time instead of requesting one message at a time? If not, can you recommend a good way to get messages off the queue in the fastest way possible?

Thank you in advance for your help.

Run multiple threads, one connection per thread, under transaction control.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
technabber
PostPosted: Wed Jul 02, 2008 2:05 pm    Post subject: Reply with quote

Newbie

Joined: 02 Jul 2008
Posts: 6

We had actually thought of that, but hoped there was a better way to do it. Because in our threading, one thread seems to dequeue, but all the others fail with a reason code 2034.

I have no idea what reason code 2034 because I can't find any documentation on reason codes.

How would I implement "transaction control" to ensure each thread gets unique messages?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 02, 2008 2:16 pm    Post subject: Reply with quote

Grand High Poobah

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

technabber wrote:
We had actually thought of that, but hoped there was a better way to do it. Because in our threading, one thread seems to dequeue, but all the others fail with a reason code 2034.

I have no idea what reason code 2034 because I can't find any documentation on reason codes.

How would I implement "transaction control" to ensure each thread gets unique messages?

Quote:

mqm@myhost:/home/mqm =>mqrc 2034

2034 0x000007f2 MQRC_NO_MSG_UNDER_CURSOR

Do not use browse.
MQ internals will ensure that the get retrieves a unique message.
Use multiples connections 1 connection per thread.
Use the sync point option in MQBase and the session transacted in JMS, XMS.
Transaction control has nothing to do with ensuring the unique message. It just speeds up the process because it isolates the acknowledgements.

OH and OF COURSE you cannot have message affinity or you need to deal with the necessary controls around message affinity yourself.
Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
technabber
PostPosted: Wed Jul 02, 2008 2:34 pm    Post subject: Reply with quote

Newbie

Joined: 02 Jul 2008
Posts: 6

Thank you for taking the time to respond to my postings and I hate to keep bothering you because of my ignorance about MQ, but...

I don't know what MQBase is, what a sync point is, or what message affinity is (we're not using JMS). Can you point me to some documentation so I can try to learn about these topics? I would be happy to RTFM, but I can't find an FM!

Also, the only example code I found out on the web uses cursors. Is there example code available somewhere that shows how to pull messages out of the queue w/o using cursors?

I apologize for asking such basic questions, but the MQ documentation on the IBM site is piss poor so I must rely on the kindness of those such as yourself to help.

Thank you, thank you.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 02, 2008 2:44 pm    Post subject: Reply with quote

Grand High Poobah

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

There are links on the top of the page... anyways:
Library
V6 Infocenter
V7 Infocenter
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
technabber
PostPosted: Thu Jul 03, 2008 4:36 am    Post subject: Reply with quote

Newbie

Joined: 02 Jul 2008
Posts: 6

I got it working. We're pulling messages off quick as a whip.

Thank you for all your help.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Jul 03, 2008 5:01 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

WMQ V7 has client message performance improvements as it "reads ahead".
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Jul 03, 2008 9:12 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

technabber wrote:
I got it working. We're pulling messages off quick as a whip.

What changes did you make?
_________________
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 » IBM MQ Java / JMS » multiple message dequeue
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.