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 » Publish / subscribe versus point-to-point : same MQ PUT ?

Post new topic  Reply to topic
 Publish / subscribe versus point-to-point : same MQ PUT ? « View previous topic :: View next topic » 
Author Message
bcostacurta
PostPosted: Tue Nov 06, 2012 6:19 am    Post subject: Publish / subscribe versus point-to-point : same MQ PUT ? Reply with quote

Acolyte

Joined: 10 Dec 2009
Posts: 71
Location: Luxembourg

Hello to All,

does a pub /sub implementation request a specific PUT on the sender side ?

In other words is it possible to implement a pub / sub on an existing feed without requesting any modification from the sending application (so just transforming the point-to-point destination queue to a pub / sub queue) ?

Thanks for attention.
Bruno
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Nov 06, 2012 6:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's not called "a pub/sub queue".

It's called a "topic".

And, yes, as of MQ v7 or later, you can administratively delete a queue and create a topic of the same name and then administratively create subscriptions, or allow applications to programatticaly create subscriptions without requiring the sender to change at all.
Back to top
View user's profile Send private message
bcostacurta
PostPosted: Tue Nov 06, 2012 7:01 am    Post subject: Reply with quote

Acolyte

Joined: 10 Dec 2009
Posts: 71
Location: Luxembourg

Many thanks for precision and reply.
Bruno
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Nov 06, 2012 7:16 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

It is a queue. It is a topic alias queue.

So yes you can simply change the queue used, to a topic alias queue. Then define durable subscriptions.

I have posted detailed examples of this on the forum, when people asked how to duplicate messages, if you search around you should find them.
Back to top
View user's profile Send private message
bcostacurta
PostPosted: Tue Nov 27, 2012 2:24 am    Post subject: Reply with quote

Acolyte

Joined: 10 Dec 2009
Posts: 71
Location: Luxembourg

Thanks Jedi Knight.

I searched for the samples (about message duplication via pub/sub) your mentioned but cannot find as there is many posts.

Could you please point me to them ?

Thanks for attention and help.
Bruno
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Nov 27, 2012 5:09 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

IT is all about using search engines these days! I use the site search (and not google) which you can limit the search to posts from a given user.

Anyway the pertinent information is this

Quote:
Ensure the PSMODE enabled (only need do this once).

ALTER QMGR PSMODE(ENABLED)

Define topic object with fixed topic string (of your choice)

DEFINE TOPIC(TEST.DUP) TOPICSTR('/MQ/DUPLICATE/TEST1') DURSUB(YES) REPLACE

Define topic alias queue using topic object

DEFINE QALIAS(TEST.ALIAS) DEFPSIST(YES) TARGTYPE(TOPIC) TARGET(TEST.DUP) REPLACE

Define local queues to receive the messages (they could also be remote queues as needed)

DEFINE QLOCAL(TEST.QUEUE1) DEFPSIST(YES) REPLACE
DEFINE QLOCAL(TEST.QUEUE2) DEFPSIST(YES) REPLACE

Define admin durable subscriptions

DELETE SUB(TEST.SUB1)
DEFINE SUB(TEST.SUB1) DEST(TEST.QUEUE1) TOPICOBJ(TEST.DUP) PSPROP(NONE)

DELETE SUB(TEST.SUB2)
DEFINE SUB(TEST.SUB2) DEST(TEST.QUEUE2) TOPICOBJ(TEST.DUP) PSPROP(NONE)

Now - just put a message to TEST.ALIAS and it should appear on both local queues.
Back to top
View user's profile Send private message
boos
PostPosted: Mon Mar 09, 2015 2:26 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jan 2004
Posts: 34
Location: Netherlands

This is briliant.

I have (based on this example of an Alias queue redirecting to a topic) made a setup of performance tests for topics. Without changing my performance testing application (which could put MQ messages but not publish).

And indeed it's a very easy way to get duplications of messages just by changing the configuration of the queues (we always use alias queues for application to PUT or GET).

Thanks for sharing this simple solution.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Mar 09, 2015 3:44 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

Just be aware these are not perfect copies. While the payload of the message data will be exactly the same, some fields in the MQMD Header will be different - Message ID for sure. Maybe the Put Time.
_________________
Peter Potkay
Keep Calm and MQ On
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 » Publish / subscribe versus point-to-point : same MQ PUT ?
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.