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 API Support » JMS_IBM_RETAIN and the .NET API

Post new topic  Reply to topic
 JMS_IBM_RETAIN and the .NET API « View previous topic :: View next topic » 
Author Message
Regen
PostPosted: Wed Aug 03, 2011 12:37 am    Post subject: JMS_IBM_RETAIN and the .NET API Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Aug 03, 2011 4:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Regen
PostPosted: Wed Aug 03, 2011 5:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Aug 03, 2011 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Wed Aug 03, 2011 7:00 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9405
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
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 03, 2011 7:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
Regen
PostPosted: Thu Aug 04, 2011 2:11 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 04, 2011 8:37 am    Post subject: Reply with quote

Grand High Poobah

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

Look at the URI definition of the destination...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Regen
PostPosted: Fri Aug 05, 2011 12:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Aug 05, 2011 4:37 am    Post subject: Reply with quote

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
View user's profile Send private message
shashikanth_in
PostPosted: Fri Aug 05, 2011 7:06 pm    Post subject: Reply with quote

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
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 API Support » JMS_IBM_RETAIN and the .NET API
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.