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 » Duplicating Queues

Post new topic  Reply to topic
 Duplicating Queues « View previous topic :: View next topic » 
Author Message
mandy13
PostPosted: Thu Sep 26, 2013 11:47 pm    Post subject: Duplicating Queues Reply with quote

Apprentice

Joined: 17 Apr 2013
Posts: 28

Hi,

I have 2 queues say Q1 and Q2. When I insert messages using MQPUT into Q1, is there any way that this message be replicated into Q2?
Does WMQ have support for queue copy?

Thanks,
mandy
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Fri Sep 27, 2013 1:24 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

no, not directly ...

there is/way something like "mirrorq" around, but i dont know if it applies to api or if it was a channel exit, please check yourself

pub / sub is also a possibility to archieve what you want
_________________
Regards, Butcher
Back to top
View user's profile Send private message
mandy13
PostPosted: Fri Sep 27, 2013 1:55 am    Post subject: Reply with quote

Apprentice

Joined: 17 Apr 2013
Posts: 28

Just some additional information
The queues reside on separate queue managers.

Thanks,
mandy
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Sep 27, 2013 4:01 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

Are the queue managers in the same MQ Cluster or connected with SNDR/RCVR channels?



Define a topic called Q1T, with a topic string of Q1

Define a sub to topic object Q1T, with a destination of Q1

Define a Q Alias called Q1Alias, target type topic with a target of Q1T

A put to Q1Alias will now produce a message to the Q1 local queue

Define another sub to topic object Q1T, this time with a destination of Q2

A put to Q1Alias will now produce 2 messages, one to Q1 and one to Q2.


The only change in the original setup is that App A puts to Q1Alias instead of Q1. App A and App B don't know they are using Pub Sub. The subscriptions are created by the MQ Admin using admin commands. The messages will be copies, but the MQMD_MessageID will be different between the two.
_________________
Peter Potkay
Keep Calm and MQ On


Last edited by PeterPotkay on Fri Sep 27, 2013 4:04 am; edited 1 time in total
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Fri Sep 27, 2013 4:03 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

well then you need a method to duplicate the messages on qmgr 1 and a connection (remoteq, xmitq, channel) from qmgr 1 to qmgr 2 to send the duplicated message over
_________________
Regards, Butcher
Back to top
View user's profile Send private message
mandy13
PostPosted: Sun Sep 29, 2013 8:42 pm    Post subject: Reply with quote

Apprentice

Joined: 17 Apr 2013
Posts: 28

Thanks PeterPotkay for your suggestion.
The queue managers are connected with SNDR/RCVR channels.


The problem is app A which reads from Q1 (on Queue Manager QMA) is not able to get the data as Q1 is an alias queue. Q2 (remote queue on Queue Manager QMB) which subscribes to the topic on which Q1 posts is able to get the data. How can app A still get the message from Q1 with Q1 being the only queue on QMA?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sun Sep 29, 2013 9:54 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

mandy13 wrote:

The problem is app A which reads from Q1 (on Queue Manager QMA) is not able to get the data as Q1 is an alias queue.

What do you mean by 'as Q1 is an alias queue'?

What what is the TARGET of the alias?

Does app A get an error when it tries? If so, what is the error?

Is app A on the same qmgr as the TARGET of the alias?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mandy13
PostPosted: Mon Sep 30, 2013 11:37 pm    Post subject: Reply with quote

Apprentice

Joined: 17 Apr 2013
Posts: 28

bruce2359 wrote:

What do you mean by 'as Q1 is an alias queue'?

the data in alias queue gets relayed to a topic and not available for read.

bruce2359 wrote:

What what is the TARGET of the alias?

TARGET of alias is a topic
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Tue Oct 01, 2013 3:34 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

mandy13 wrote:
How can app A still get the message from Q1 with Q1 being the only queue on QMA?


It cannot. Follow my suggestions above. If you make Q1 the Alias that resolves to the topic, you need to make a new queue (lets call it NewQ), make an Administrative subscription to it, and have App A read from NewQ.

If you want App A to read from a queue called Q1, then you need to make the Alias that refers to the TOpic a different name and have the putting app change.

Sorry, either the putter or the original getter needs to change the q name they use if you want to use the method I suggest.
_________________
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 » Duplicating Queues
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.