Author |
Message
|
Regen |
Posted: Wed Aug 03, 2011 12:37 am Post subject: JMS_IBM_RETAIN and the .NET API |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 4
|
Hello,
I am publishing a message using the .NET API.
The runtime version of IBM.XMS is v2.0.50727.
However, when I try to set the message retention as shown in the JAVA samples, by using:
sendMsg.SetIntProperty("JMS_IBM_RETAIN", 1);
I get an exception, that this property is not supported by this framework.
What is the way to publish messages that are retained in MQ?
Thank you very much,
Andrey |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 03, 2011 4:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ok, just to be clear:
Why are you writing a .NET application with reference to the Java samples?
What version of WMQ do you have that version of XMS on?
Are you really attempting to create a retained publication, or just a persistent message? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Regen |
Posted: Wed Aug 03, 2011 5:44 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 4
|
Hello,
My previous post was not clear enough.
The WMQ version is Websphere MQ fix pack 7.0.1.6 .
I am trying to publish a persistent message. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 03, 2011 6:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Regen wrote: |
I am trying to publish a persistent message. |
Ok, "publish" means something specific in WMQ; the publish/subscribe functionality. The term you're looking for is "put".
The property you're using is the pub/sub one. What you need is to set the message persistence. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Aug 03, 2011 7:00 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
What you need is to set the message persistence - of the MessageDescriptor structure (MQMD). _________________ 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 |
|
 |
fjb_saper |
Posted: Wed Aug 03, 2011 7:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bruce2359 wrote: |
What you need is to set the message persistence - of the MessageDescriptor structure (MQMD). |
In JMS / XMS this property can be set on the destination...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Regen |
Posted: Thu Aug 04, 2011 2:11 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 4
|
fjb_saper wrote: |
bruce2359 wrote: |
What you need is to set the message persistence - of the MessageDescriptor structure (MQMD). |
In JMS / XMS this property can be set on the destination...  |
Will it be convenient for you to post a sample? [: Thank you very much. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 04, 2011 8:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Look at the URI definition of the destination...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Regen |
Posted: Fri Aug 05, 2011 12:09 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2011 Posts: 4
|
fjb_saper wrote: |
Look at the URI definition of the destination...  |
It is:
topic://....?persistent=1 anyway, What I want is to publish to the topic as a retained message. [:
I want to simulate the "Test publication" - "retained message" checkbox in the MQ Explorer.  |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 05, 2011 4:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Regen wrote: |
What I want is to publish to the topic as a retained message. [:
I want to simulate the "Test publication" - "retained message" checkbox in the MQ Explorer.  |
I deliberately asked:
Vitor wrote: |
Are you really attempting to create a retained publication, or just a persistent message? |
and you said:
Regen wrote: |
I am trying to publish a persistent message. |
you actually meant "publish a retained publication"
If you don't understand the concepts well enough to ask questions clearly, you're going to waste everyone's time including your own because we're going to give you the wrong advice!
There is a major difference between a persistent message and a retained publication. There is a major difference between putting a message and publishing to a topic.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
shashikanth_in |
Posted: Fri Aug 05, 2011 7:06 pm Post subject: |
|
|
Centurion
Joined: 26 Feb 2009 Posts: 123
|
As Vitor said, you need to know the difference between a persistent message and retained publication.
Anyway here is code snippet that publishes a retained publication.
ITextMessage msg = session.CreateTextMessage("A Retained Publication");
msg.SetIntProperty(XMSC.JMS_IBM_RETAIN, 1); |
|
Back to top |
|
 |
|