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 » PUB/SUB in MB and MQ

Post new topic  Reply to topic
 PUB/SUB in MB and MQ « View previous topic :: View next topic » 
Author Message
mbtech
PostPosted: Wed Feb 13, 2013 9:29 pm    Post subject: PUB/SUB in MB and MQ Reply with quote

Apprentice

Joined: 18 Jul 2012
Posts: 36

I have configured a pub/sub in mq7 with 2 topics 2 alias queues for topics and 3 outputqueues for 4 subscriptions
Q1 subscribed for topic1 only
Q2 subscribed both topics 1 & 2
Q3 subscribed for topic2 only

I develop a flow in MB taking 2 alias queues as input queues and 3 output queues using destination list coding as




Code:

SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'SUB.INQ.SPORTS';
          SET OutputLocalEnvironment.Destination.MQ.DestinationData[2].queueName = 'SUB.INQ.SPORTSNSTOCKS';
          SET OutputLocalEnvironment.Destination.MQ.DestinationData[3].queueName = 'SUB.INQ.STOCKS';



when i send a message in input q i.e topic1 alias q its going to only one queue i need to get it in Q1 & Q2 also
Same with the case of Topic2 where it has to come for Q2 & Q3

Let me know any inputs
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu Feb 14, 2013 12:23 am    Post subject: Re: PUB/SUB in MB and MQ Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

mbtech wrote:
when i send a message in input q i.e topic1 alias q its going to only one queue i need to get it in Q1 & Q2 also
Same with the case of Topic2 where it has to come for Q2 & Q3


How do you send message to Alias Queue of Topic? Are you sending the messages to the topics? If you are publishing the message to Topic-1, it will be subscribed by the queues which has registered the subscription. Can you please be more clear on your design and doubt?
Back to top
View user's profile Send private message Send e-mail
mbtech
PostPosted: Thu Feb 14, 2013 12:55 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2012
Posts: 36

Hi
Iam sending it through alias queues pointing to topics when i tested purely on MQ by putting a message in alias queue of topic1 as it is subscribed by both Q1 & Q2 both are receiveing.It is entirely fine in MQ

When i develop a flow for it in mb like

MQIN_ALIAS_TOPIC1
MQIN_ALIAS_TOPIC2


COMPUTE

Q1 Q2 Q3


for TOPIC1 i should get in Q1 & Q2 because they subscribed TOPIC1

for TOPIC2 i should get in Q3 & Q2 because they subscribed TOPIC2

Q2 subscribed both topics

when i send a message to topic am getting in either of Q1 or Q2 not both, which is not the desired output.
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu Feb 14, 2013 3:13 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Still it is not very clear. You have two Topics,

Quote:

Topic-1 and Topic-2.

Topic-1 Alias Queue: A1
Topic-2 Alias Queue: A2

Topic-1 Subscribers - Q1, Q2
Topic-2 Subscribers - Q2, Q3


When you have checked with WMQ by posting messages to A1 and A2, you are able to see the messages subscribed by Q1,Q2 (for A1) and Q2,Q3 (for A2).

Now what are you trying to do in WMB here?
Back to top
View user's profile Send private message Send e-mail
mbtech
PostPosted: Thu Feb 14, 2013 4:53 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2012
Posts: 36

TOPIC1--SPORTS--ALIAS1Q
TOPIC2--STOCKS--ALIAS2Q


SUBSCRIPTIONS

S1 S2 S2a S3
Sports sports stocks stocks


OUTQ1 SPORTS
OUTQ2 SPORTSNSTOCKS FOR EITHER SPORTS OR
STOCKS IT SHOULD RECEIVE MESSAGE
OUTQ3 STOCKS

Iam receiving in only oneq either OUTQ1 or OUTQ2
OR OUTQ2 or OUTQ3

Is it like alias queue cannot send message to multiple queues
[/b]
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 14, 2013 5:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Messages are published to a topic.

A single message published to a single topic is delievered once to each subscriber of that topic.

if you have two topics, SPORTS and STOCKS, and four subscribers as you have laid out.

When you publish to SPORTS, one copy of that message will go to each subscriber to SPORTS.

So you have subscribers S1, and S2. One message will be delivered to S1 and one message will be delivered to S2.

When you publish to STOCKS, one copy of that message will go to each subscriber to STOCKS.

You have subscribers S2a and S3. One message will be delivered to S2a and one message will be delivered to S3.

If, somehow, you publish a message to *both* stocks AND sports, then you should see one message at all four subscribers.
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 » WebSphere Message Broker (ACE) Support » PUB/SUB in MB and MQ
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.