|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Unreliable retained publication under mq 7.0.0/7.0.1 |
« View previous topic :: View next topic » |
Author |
Message
|
Duong Nguyen |
Posted: Mon Jul 12, 2010 7:26 pm Post subject: Unreliable retained publication under mq 7.0.0/7.0.1 |
|
|
Newbie
Joined: 28 Jan 2009 Posts: 6
|
Websphere mq seems to have a problem with retained publications.
My program, when started, publishes to a couple of topics with the MQPMO_RETAIN option.
Another program subscribes to one of these topics to get the publications. One out of, say three times, this program gets nothing.
To eliminate possible coding problem, I used the sample amqspuba with a third option of 2097152 (i.e. MQPMO_RETAINED) to publish a test retained message:
amqspubc TEST_TOPIC QM.ITSMMS 2097152
and send a test message.
I then use the sample application amqssuba to read the retained message:
amqssubc TEST_TOPIC QM.ITSMMS
The same problem occurs, occasionally nothing came back when amqssubc starts. The first few times, right after the retained publication, everything seems OK. Then occasionally nothing came. Please note that I published the retained message once only. The subscription program were run multiple times.
The version of mq are 7.0.0/Windows server 2003-32bit and 7.0.1/Windows server 2008-64bit.
Have I done something wrong with the sample program test? |
|
Back to top |
|
 |
zpat |
Posted: Mon Jul 12, 2010 11:26 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Has the option of MQSO_NEW_PUBLICATIONS_ONLY been set or defaulted in the subscriber? |
|
Back to top |
|
 |
Duong Nguyen |
Posted: Tue Jul 13, 2010 1:38 pm Post subject: |
|
|
Newbie
Joined: 28 Jan 2009 Posts: 6
|
zpat wrote: |
Has the option of MQSO_NEW_PUBLICATIONS_ONLY been set or defaulted in the subscriber? |
No, not in my program and not in the IBM mq sample programs. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Jul 13, 2010 3:07 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
No, not in my program and not in the IBM mq sample programs. |
Let me ask in a different way: what MQSO_ option(s) did you specify? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Duong Nguyen |
Posted: Tue Jul 13, 2010 3:55 pm Post subject: |
|
|
Newbie
Joined: 28 Jan 2009 Posts: 6
|
bruce2359 wrote: |
Quote: |
No, not in my program and not in the IBM mq sample programs. |
Let me ask in a different way: what MQSO_ option(s) did you specify? |
If we disregarded my own program and stick to the IBM sample programs:
1) Publication: amqspubc TEST_TOPIC QM.ITSMMS 2097152, the sample program uses the third argument as the only publish message option so that would have to be 2097152 (i.e. MQPMO_RETAINED)
2) Subscription: amqssubc TEST_TOPIC QM.ITSMMS, since the third argument is not there the sample program would use:
sd.Options = MQSO_CREATE
| MQSO_NON_DURABLE
| MQSO_FAIL_IF_QUIESCING
| MQSO_MANAGED;
So, at least the IBM sample programs would have to work.
If you have access that allows publication and subscription then it would be very easy to see that something is not quite right with retained publication. Just do step 1), send a test message. Control-C to get out of step 1) if you want to (you don't have to.) Do step 2) to get the retained publication. Either Control-C to get out or wait for the 30 seconds time out (I've tried both, no difference) Do step 2) again and again and again. Sometimes the retained publication came back, sometimes not.
Unless I'm not doing something right, then the only explanation I can think of is that mq does retain the publication (otherwise how do we get the publication when the publish application itself has been aborted) but sometimes it does not want to send it to a new subscription. |
|
Back to top |
|
 |
vmcgloin |
Posted: Tue Jul 13, 2010 11:51 pm Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
When the retained publication does not arrive do new publications arrive sucessfully? |
|
Back to top |
|
 |
Duong Nguyen |
Posted: Wed Jul 14, 2010 12:43 am Post subject: |
|
|
Newbie
Joined: 28 Jan 2009 Posts: 6
|
vmcgloin wrote: |
When the retained publication does not arrive do new publications arrive sucessfully? |
Yes. For testing what I did was to get the publish program (my program, not the IBM test program) to publish every minute. The subscribe program always receive the subsequent publications, but not always the first one.
The IBM test program could also be used to test this scenario, simply send another test message I suppose. |
|
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
|
|
|
|