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 Java / JMS » Format of Publish/Subscribe commands

Post new topic  Reply to topic
 Format of Publish/Subscribe commands « View previous topic :: View next topic » 
Author Message
sirish
PostPosted: Mon Jan 22, 2007 3:01 am    Post subject: Format of Publish/Subscribe commands Reply with quote

Newbie

Joined: 11 Jan 2007
Posts: 4

Hi,
My question is with regard to the format of the Publish/Subscribe messages that are generated. This is more to do with things that happen behind the scenes. Here are the steps that i followed


Setup : I have Websphere MQ v 6.0 with refresh pack for 6.0.1.0 installed. (The refresh pack would allow me to view the Topics if any in the MQ explorer)

Step 1: Open Web sphere MQ explorer

Step 2: Created a queue manager i.e TestQueueManager

Step 3: Created a local queue i.e TestQueue

Step 3: Started the broker on this queue manager using the following command

strmqbrk -m TestQueueManager

Step 4: Registered a publisher for the topic TestTopic by right clicking on the Topics icon and selecting the option in the pop up menu (this would create a TestTopic entry under the Topics folder)

Step 5: Registered a subsciber for the same topic (TestTopic) using the option "Register subscriber" in the pop up menu as before. In this case i gave TestQueue as the delivery queue name


Step 6: I tested the publication by using the "Test publisher" option. This would post a message to the topic TestTopic which the broker would deliver to the subscriber and the message would be made available on the queue TestQueue


Behind the scenes, this is what is happening.

The publisher would be generating a Publish message in MQRFH format would be sending this to the Default stream of the broker. The broker would interpret this and would forward the message to the registered susbcriber.

Now i want to do this programmatically. In other words, I know how to connect to queues using the Websphere classes for base java (MQMessage, MQQueueManager etc). Now if i can create a publish message in the required format then it would involve just sending this messsage to the broker.

And that's where i am stuck and would need inputs.

Thanks

PS: I am staying away from the JMS publish/subscribe as of now. I want to get my hands dirty with some low level programming and hence the query
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jan 22, 2007 3:11 am    Post subject: Re: Format of Publish/Subscribe commands Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sirish wrote:
Now i want to do this programmatically. In other words, I know how to connect to queues using the Websphere classes for base java (MQMessage, MQQueueManager etc). Now if i can create a publish message in the required format then it would involve just sending this messsage to the broker.


There's a section in the Publish / Subscribe manual called "Writing applications" that discusses this and related topics in some detail.

But it sounds like you're on the right track (<psc> section of an RFH2 sent to the broker control queue).

Do you have a specific problem the manual doesn't seem to answer?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sirish
PostPosted: Mon Jan 22, 2007 8:24 pm    Post subject: Reply with quote

Newbie

Joined: 11 Jan 2007
Posts: 4

Hi again,
Well i have gone through the manual and still was not clear about the exact format.

The MQRFH2 format would be supported by Websphere Message Broker. With regard to the broker running on MQ, i guess it should be in MQRFH1 format. I therefore needed inputs in this directions

Thanks a bunch in advance
Sirish
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 23, 2007 2:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The MQ Using Publish/Subscribe manual does discuss the format of the MQRFH header. The WMB pub/sub manual discusses the format of the MQRFH2 header.

The pub/sub samples that come with MQ use the MQRFH header.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 23, 2007 3:43 pm    Post subject: Reply with quote

Grand High Poobah

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

sirish wrote:
I know how to connect to queues using the Websphere classes for base java (MQMessage, MQQueueManager etc

Now if you just learn how to use the JMS API you'll be saving yourself a world of hurt in pub/sub.

The JMS API is specially geared towards supporting the pub/sub model.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvic
PostPosted: Tue Jan 23, 2007 5:47 pm    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

fjb_saper wrote:
The JMS API is specially geared towards supporting the pub/sub model.

Also the XMS client libraries will allow you to work more easily with pub/sub in C, C++, .NET.
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 Java / JMS » Format of Publish/Subscribe commands
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.