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 » WebSphere Message Broker (ACE) Support » Any example for How to subcribe in Message Broker

Post new topic  Reply to topic Goto page 1, 2  Next
 Any example for How to subcribe in Message Broker « View previous topic :: View next topic » 
Author Message
ravi_sri24
PostPosted: Wed Dec 06, 2006 2:25 am    Post subject: Any example for How to subcribe in Message Broker Reply with quote

Voyager

Joined: 11 May 2006
Posts: 83

Hi,

I am implementing a sample Pub/sub flow in WMB. I am new to this.
I just followed the below pdf to create publication
http://www.redbooks.ibm.com/redbooks/pdfs/sg246088.pdf
there is nothing mentioned about how to subscribe for a specific topic. can any one provide the related docs for how to subscribe for a specific topic with the example please.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 06, 2006 2:45 am    Post subject: Reply with quote

Grand High Poobah

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

Try the publish/subscribe manual, available here:

http://www-306.ibm.com/software/integration/wbimessagebroker/library/
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ravi_sri24
PostPosted: Wed Dec 06, 2006 3:18 am    Post subject: Reply with quote

Voyager

Joined: 11 May 2006
Posts: 83

Hi,

I have completed the publication flow and publishing to the one topic, the publication flow is like below

MQInput --> Compute--> PublicationNode

The code is below

SET OutputRoot.MQMD.Format = 'MQRFH2';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.psc.Command = 'Publish';
SET OutputRoot.MQRFH2.psc.Topic = 'COMPANY';


While developing the subscribe flow am not able to getting what queue name i have to mention in Inputnode and outputnode, the flow is like below

MQInput --> Compute--> MQOutput

the code in the compute node is :

SET OutputRoot.MQMD.Format=MQFMT_RF_HEADER_2;
Set OutputRoot.MQRFH2.psc.Command='RegSub';
Set OutputRoot.MQRFH2.psc.Topic='COMPANY';
Set OutputRoot.MQRFH2.psc.QName='out';
Set OutputRoot.MQRFH2.psc.QMgrName='BRKQM';

please advice me is am going through the correct way or not, or is there any configuration is required
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 06, 2006 3:22 am    Post subject: Reply with quote

Grand High Poobah

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

How did you register the subscription? Or do you believe the flow is doing that?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ravi_sri24
PostPosted: Wed Dec 06, 2006 3:32 am    Post subject: Reply with quote

Voyager

Joined: 11 May 2006
Posts: 83

Hi,

Am new to this, am not having that much idea on this and please advice me how to registr
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 06, 2006 3:39 am    Post subject: Reply with quote

Grand High Poobah

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

Rather than reading a redbook (useful though the publication is), I would recommend you sit down with the manual, get to grips with the terminology and then have a go at it. I'm a firm believer in experimentation as an aid to learning & I commend your enthuiasm but there's no point leaping head first into something without some level of understanding any more than there's a point to me trying to explain something that's been laid out by a properly qualified author in an IBM publication. The manual will explain it better, more clearly and more concisly than I could.

You need to understand topic, security, subscription and subscription points before proceeding. You seem to be trying to get the flow to issue a subscription request when I suspect you want it to be the subscribing application.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 06, 2006 3:39 am    Post subject: Reply with quote

Grand High Poobah

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

Use RFHUTIL (support pack IH03) for your first steps. The rest will then appear easy.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Dec 06, 2006 3:40 am    Post subject: Reply with quote

Grand High Poobah

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

fjb_saper wrote:
Use RFHUTIL (support pack IH03) for your first steps. The rest will then appear easy.

Enjoy


And yes, RFHUTIL's a good way of subscribing....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
haimame
PostPosted: Thu Dec 07, 2006 5:58 am    Post subject: Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 7

Hi,

I have gone thru the docs as u mentioned in the prev. message...I have created the flow for publication and i am using the below esql in the compute node.

Flow:
MQInput (uses a local queue called "pub_in")-> Compute -> Publication

*************************************************************
Esql:
CREATE COMPUTE MODULE TopicRegister_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
SET OutputRoot.MQMD.Format = 'MQRFH2';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.psc.Command = 'Publish';
SET OutputRoot.MQRFH2.psc.Topic = 'shiva';
SET OutputRoot.XML.CompanyFramework = InputRoot.XML.CompanyFramework;

RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER;
DECLARE J INTEGER;
SET I = 1;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
*************************************************************
Using Rfhutil, i made a subsription request. I can also see this request in the WMB toolkit at subscriptions window.

When i put a message in the queue "pub_in", it immediately moves from that queue. But it is not publishing in subscription queue(sub_out) as i gave in the RFHUtil.

As per my understanding i can directly subscribe thru RFHUtil instead of subscribing and getting the message to my subscription queue using Message flow.

Please correct me where i am making the mistake and why the message is not sent to my subscription queue.(both "sub_out" and "pub_in" queue are in same queue manager)

Kindly explain me how to proceed this...I have gone thru all the docs. I couldnt find any step by step procedure for the above scenario.

Thanks,
Shiv
Back to top
View user's profile Send private message
vk
PostPosted: Thu Dec 07, 2006 6:44 am    Post subject: Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

Quote:
SET OutputRoot.MQMD.Format = 'MQRFH2';


The setting of format in MQMD header is wrong. It should be MQHRF2.

SET OutputRoot.MQMD.Format = 'MQHRF2 '; OR

SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;

Regards,
VK.
Back to top
View user's profile Send private message
haimame
PostPosted: Mon Dec 11, 2006 2:06 am    Post subject: Unable to set CorrelID in the MQMD Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 7

Hi,

Atlast it worked. I didnt set MessageDomain as xml in the MQInput Node property. After i set this it got worked.

I am writing a message thru RFH util to my queue. While sending message i gave my own correlid in MQMD tab of the RFH util. The same id what i gave, was exist in the MQMD before the message is processed by the flow.. But after the message processed by the flow the broker created its own correlid..It is not taking the one which i set in the input message. I also tried the following code in the compute node. But it is not working.

Esql code in compute node:

SET OutputRoot.MQRFH2.(MQRFH2.Field)CorrelId = InputRoot.MQRFH2.(MQRFH2.Field)CorrelId;

My objective is, what ever CorrelId which i am setting in the input MQMD, the same correlID should be copied to the output MQMD by the broker.
Please help me to achieve this.
Back to top
View user's profile Send private message
dipankar
PostPosted: Mon Dec 11, 2006 3:41 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Set the 'message context' to ''Set all'in advance tab of MQOutput node
_________________
Regards
Back to top
View user's profile Send private message
haimame
PostPosted: Tue Dec 12, 2006 9:33 pm    Post subject: subscription fails Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 7

dipankar wrote:
Set the 'message context' to ''Set all'in advance tab of MQOutput node


When i set the message context to set all, then the subcription registration fails and shows the error code 3081. If i set the message context to pass all it didnt show any error.

The userid which iam using has got the admin rights.
but still it shows error code:3081:MQRCCF_NOT_AUTHORIZED
How do i correct it..?
Back to top
View user's profile Send private message
haimame
PostPosted: Wed Dec 13, 2006 3:53 am    Post subject: Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 7

Hi can any one reply on the above message
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 13, 2006 4:23 am    Post subject: Reply with quote

Grand High Poobah

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

Have you authorized the user/group in the pub/sub topology for the topic?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Any example for How to subcribe in Message Broker
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.