|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Getting messages with message ID |
« View previous topic :: View next topic » |
Author |
Message
|
EgilsJ.Rubenis |
Posted: Fri Dec 10, 2004 3:24 am Post subject: Getting messages with message ID |
|
|
Acolyte
Joined: 18 Nov 2002 Posts: 63 Location: Germany, Alfeld
|
Hi,
could somebody explain what happens when I'm doing a get with defined messageId. I have a Queue with lets say 500 entries. The message I'm looking for is on position 480. Is the system reading every message and compairing the messageID or is there an index ?
I had a problem on z/OS where the get with message ID happend to be very slow. My Cics Transactions became to run about 20 minutes and i could see that there were many IO's on the pagesets.
If the method is sequentiell is there a posibility to speed it up?
cheers and a nice weekend, Egils |
|
Back to top |
|
 |
Nigelg |
Posted: Fri Dec 10, 2004 3:39 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
See this quote from the APR, MQMD, MsgId
Quote: |
Note:
The queue is scanned sequentially for a message that satisfies the selection criteria, so retrieval times will be slower than if no selection criteria are specified, especially if many messages have to be scanned before a suitable one is found.
|
The msg are not actually read. A hash value (single byte) of the MsgId on a msg is kept in the in-memory list of the msgs on disk. The required MsgId is also hashed, and the values compared. If they match, the msg is read from disk and the actual MsgIds compared. So, if the 500 msgs on the queue have an even distribution of MsgIds, which they probably will have, to reach your required msg at pos 480 you might expect 479 in-memory compares, taking very little time, and 1 read of a msg from the disk, taking a little longer.
There is no really noticeable degradation of msg retrieval if there are fewer than 10000 msgs on the queue.
This also applies to CorrelIds.
On distributed systems there is no way of speeding up this process.
On z/OS you can choose to index a queue by MsgId, CorrelId, or GroupID in the attribute INDXTYPE. |
|
Back to top |
|
 |
EgilsJ.Rubenis |
Posted: Mon Dec 13, 2004 1:28 am Post subject: Thanks |
|
|
Acolyte
Joined: 18 Nov 2002 Posts: 63 Location: Germany, Alfeld
|
Hi Nigel,
thanks for the information. I forgott to set the IndexType on my Queue.
Going to Try it out right away
Cheers, Egils |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|