|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
where does a message go first when it arrives on a queue |
« View previous topic :: View next topic » |
Author |
Message
|
jeevan |
Posted: Tue Aug 18, 2009 12:35 pm Post subject: where does a message go first when it arrives on a queue |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Where does a message go when it arrives first to a queue? Does it go to q file under mq_Home/qmgrs/qmgr/queues? And if the messge is persistent it also is written in log. Is this correct?
if it writes all messages to q file, how mq looses the message when queue manager goes down, as a file is not a volatie media? if it only writes persistent message to q file, why these messages are written again in log file?
Could some one shed light on it ?
thanks |
|
Back to top |
|
 |
Bill.Matthews |
Posted: Tue Aug 18, 2009 12:55 pm Post subject: |
|
|
 Master
Joined: 23 Sep 2003 Posts: 232 Location: IBM (Retired)
|
The normal operation is:
When a persistent message arrives it is first written to the log. Then it is placed into the buffer that is associated with the queue. If that causes the buffer to be full then the oldest message in the buffer is written to the q file.
A non-persistent message just goes to the buffer.
When a MQGet is outstanding against that Queue and the message satisfies the MQGet then the message is given to the application immediately.
MQ doesn't loose persistent messages. Look at your second question in terms of the answer to your first question. Simply put - MQ logs first and only when the logging operation is completed is anything else done with the message. _________________ Bill Matthews |
|
Back to top |
|
 |
jeevan |
Posted: Tue Aug 18, 2009 12:59 pm Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
Bill.Matthews wrote: |
The normal operation is:
When a persistent message arrives it is first written to the log. Then it is placed into the buffer that is associated with the queue. If that causes the buffer to be full then the oldest message in the buffer is written to the q file.
A non-persistent message just goes to the buffer.
When a MQGet is outstanding against that Queue and the message satisfies the MQGet then the message is given to the application immediately.
MQ doesn't loose persistent messages. Look at your second question in terms of the answer to your first question. Simply put - MQ logs first and only when the logging operation is completed is anything else done with the message. |
Got it. I thought all messages are written in the q file. So, I was wondering. I know persistent messages are not lost. |
|
Back to top |
|
 |
Bill.Matthews |
Posted: Tue Aug 18, 2009 2:06 pm Post subject: |
|
|
 Master
Joined: 23 Sep 2003 Posts: 232 Location: IBM (Retired)
|
jeevan,
It is worth remembering that if the rate of arrival of messages is greater that the rate of getting then the odds are high that the messages will be flushed out of the buffer to the Q file. But if the reverse is true, the messages would not be written to the Q file.
Also note that the size of the buffer can be specified prior to the creating of the Queue if that is desired. Check the MQ docs for performance suggestions to find out how to do this.
Now, if the size of the message is larger than the available buffer then it is going to be written to the q file.
Do take some time and look through the MQ Performance reports on the SupportPac website. In addition to reading the one about your current MQ, also look at the older ones since they can also provide some good information.
Good luck. _________________ Bill Matthews |
|
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
|
|
|
|