简体   繁体   中英

WMQ copy messages between queue managers

I have a queue Q1 on queue manager QMA and an app A reading the data from Q1. The data from Q1 needs to be replicated to another queue Q2 on queue manager QMB with app A still reading from Q1 and Q2 also getting the message. I make Q1 an alias queue which posts its data on a topic (TopicA) to which Q2 has subscribed via a remote queue. Q2 is able to get the data. The problem is app A which was reading from Q1 is not able to get the data. Can this be re-modelled so that both app A and Q2 gets the data?

Create another durable subscription for TopicA with destination as Q3 and change your application get messages from queue Q3 instead of Q1 . When an application puts message to Q1 (basically to alias topic TopicA ) that message gets routed to both Q2 on QMB and Q3 on QMA .

If you are able to change the queue for your putting application, then follow below steps:

  1. Make Q1 as local queue instead of alias queue.
  2. Create another alias queue, say "Publisher", with Base object as topic and give your topic in destination as you did before.
  3. Create Subscriptions for queue Q1, for your topic.
  4. Point your putting application to put messages in the "Publisher" queue instead of Q1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM