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 » Subscribe from within message flow

Post new topic  Reply to topic Goto page 1, 2  Next
 Subscribe from within message flow « View previous topic :: View next topic » 
Author Message
oli
PostPosted: Mon Mar 22, 2010 8:31 am    Post subject: Subscribe from within message flow Reply with quote

Acolyte

Joined: 14 Jul 2006
Posts: 68
Location: Germany

Hi all,

does anybody know how a subscribe/unsubscribe can be done from within a message flow using WebSphere Message Broker 7 (with WebSphere MQ 7)?
In WebSphere Message Broker 6.1 the subscription could be done by simply putting a special message into a SYSTEM.BROKER queue.

Thanks,

Oli
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 22, 2010 12:22 pm    Post subject: Re: Subscribe from within message flow Reply with quote

Grand High Poobah

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

oli wrote:
Hi all,

does anybody know how a subscribe/unsubscribe can be done from within a message flow using WebSphere Message Broker 7 (with WebSphere MQ 7)?
In WebSphere Message Broker 6.1 the subscription could be done by simply putting a special message into a SYSTEM.BROKER queue.

Thanks,

Oli

What does the manual say?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
oli
PostPosted: Mon Mar 22, 2010 10:31 pm    Post subject: Reply with quote

Acolyte

Joined: 14 Jul 2006
Posts: 68
Location: Germany

Unfortunately I didn't find any hint in the manuals/info center concerning this isssue
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Mar 22, 2010 11:57 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

The whole pub/sub functionality for V7 was one of the big changes.
The Broker Pub/Sub engine was moved into the WMQ one.
Take a look at the WMQ V7 docs on Pub/Sub.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
oli
PostPosted: Tue Mar 23, 2010 1:16 am    Post subject: Reply with quote

Acolyte

Joined: 14 Jul 2006
Posts: 68
Location: Germany

For sure I have read the MQ documentation concerning Pub/Sub but I couldn't find out how to do a subscription from within a message flow. I understand how to do a subscription from an MQ application but at the moment I don't understand how to do it from within a message flow, i.e. how the MQSUB can be executed from within a message flow ...

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 23, 2010 1:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac16915_.htm

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.csqzac.doc/pc18050_.htm
Back to top
View user's profile Send private message
oli
PostPosted: Tue Mar 23, 2010 2:14 am    Post subject: Reply with quote

Acolyte

Joined: 14 Jul 2006
Posts: 68
Location: Germany

Hi mqjeff,

first thanks for your help. But does this mean that we can only create administrative subscriptions (of type "ADMIN") from within a message flow? Or is there any way to create a subscription with type "API", too?

Thanks,

Oli
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 23, 2010 2:28 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The only option you have in ESQL is to build a PCF message, to the best of my very limited knowledge on this subject.

Whether or not a PCF message will allow you to create an "API" subscription instead of an "ADMIN" subscription, I don't know. I'm in fact unclear on the difference between the two.
Back to top
View user's profile Send private message
oli
PostPosted: Tue Mar 23, 2010 2:46 am    Post subject: Reply with quote

Acolyte

Joined: 14 Jul 2006
Posts: 68
Location: Germany

Is there anybody else who has a deeper knowledge about that issue?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 23, 2010 9:49 am    Post subject: Reply with quote

Grand High Poobah

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

I would try like in V6 to create a JMS subscription. The broker should certainly be able to create the content for that type of message.

What does RFHutil(c) say?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Mandeep
PostPosted: Wed Mar 24, 2010 5:48 am    Post subject: Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 33

In our case, since we did not have permissions to connect RFHUTIL to higher environments, so we created an HTTP based flow to do this job.

HTTPInput --> Compute --> MQPUT to SYSTEM.BROKER.CONTROL.QUEUE ---> HTTPReply

Below is the Compute Node ESQL:

SET OutputRoot.MQMD.MsgType = 1;
SET OutputRoot.MQMD.ReplyToQ = 'REPLY.TO.Q';
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
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 = 'RegSub';
SET OutputRoot.MQRFH2.psc.RegOpt = 'NewPubsOnly';
SET OutputRoot.MQRFH2.psc.QMgrName = queuemanagerName;
SET OutputRoot.MQRFH2.psc.Topic=topicName;
SET OutputRoot.MQRFH2.psc.QName = queueName;
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Aug 10, 2011 12:30 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

I am surprised that there is no encapsulation of the MQSUB function inside the message broker in version 7.

Is there really no way to subscribe in WMB 7 other than setting up an administrative subscription to a permanent queue?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 10, 2011 7:14 am    Post subject: Reply with quote

Grand High Poobah

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

zpat wrote:
I am surprised that there is no encapsulation of the MQSUB function inside the message broker in version 7.

Is there really no way to subscribe in WMB 7 other than setting up an administrative subscription to a permanent queue?

Don't be surprised... It's there, has been there, was always there...
Use the RFH2 like you would for a normal JMS subscription...
Still works like a charm...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Wed Aug 10, 2011 8:49 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

You are referring to the "old" queue based pub/sub engine? Assuming the queue manager is configured to handle the "old" pub/sub queues requests.

But it's still not quite like the WMQ v7 MQSUB call.

How would using a queued subscription method allow a message flow to automatically subscribe? What would start the flow in the first place? I suppose you would need one flow to register the subscription and another to process the messages?

But it is another technique that I can consider, thanks. No doubt IBM will include MQSUB functionality at some point.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2011 9:46 am    Post subject: Reply with quote

Grand High Poobah

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

zpat wrote:
But it's still not quite like the WMQ v7 MQSUB call.


No, and I've spent a fair amount of time looking for that as well.

zpat wrote:
How would using a queued subscription method allow a message flow to automatically subscribe? What would start the flow in the first place? I suppose you would need one flow to register the subscription and another to process the messages?


I've done that and it does work, but so cumbersome. I cheated slightly and redesigned so that I could use scripted subscriptions to permantent queues as you indicated.

zpat wrote:
No doubt IBM will include MQSUB functionality at some point.


We can hope. And raise requirements. It's the squeaky wheel.....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
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 » Subscribe from within message flow
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.