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 » General IBM MQ Support » Copy of Message

Post new topic  Reply to topic
 Copy of Message « View previous topic :: View next topic » 
Author Message
girish_tharwani
PostPosted: Wed Aug 14, 2002 6:46 am    Post subject: Copy of Message Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

I think I know the answer to this question but it does not hurt to ask; right .
I have a third party application that puts a message on a queue (say Q1).
But I need two copies of this message on two queues. Since I can not modify the application , I can write a program that reads Q1 and puts two copies of this message on two queues. Same can be done using an MQSI flow instead of the program. But is there any plane MQSeries way of doing this without using MQSI or any program.
Back to top
View user's profile Send private message
girish_tharwani
PostPosted: Wed Aug 14, 2002 6:56 am    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

When I say I know the answer, I mean to say that I do not know any third way of doing it.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Aug 14, 2002 9:45 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Nope. You listed the 3 ways. Modify the putting app, add an MQSI flow, or make an app that intercepts the message on the other side and does the double put itself.


As an aside....
A while back on the list serve I proposed the idea of expanding the remote queue definition of a queue. Why limit it to to only 1 remote queue/ queue manager. Wouldn't it be cool to be able to have something like the following?

QueueManager1 has local queue called QueueA
QueueManager2 has local queue called QueueA
QueueManager3 has local queue called QueueA

QueueManager4 has local queue called LogQueueA
QueueManager4 has remote queue called QueueA

Remote QueueA on QM4 would be defined as follows:
DEFINE QREMOTE(QueueA)
RNAME1(QueueA) RQMNAME1(QueueManager1) XMITQ(ToTheHub) +
RNAME2(QueueA) RQMNAME2(QueueManager2) XMITQ(ToTheHub) +
RNAME3(QueueA) RQMNAME3(QueueManager3) XMITQ(ToTheHub) +
RNAME4(LogQueueA) RQMNAME() XMITQ()


Now we could administrativly control copies of messages. For some reason Hursley didn't see the value.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
girish_tharwani
PostPosted: Wed Aug 14, 2002 9:54 am    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

Yeah, this is exactly what I had in my mind. I also feel that remote queue defination should be expanded to handle multiple queues and queue managers
Back to top
View user's profile Send private message
clindsey
PostPosted: Wed Aug 14, 2002 5:15 pm    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

If you are looking for a utility to do the copy, go to the downloads and grab mirrorq from the c/c++ section. The source code is there so you can modify as needed to suite your needs but it will be a good start.

Charlie
Back to top
View user's profile Send private message
jc_squire
PostPosted: Wed Aug 14, 2002 5:57 pm    Post subject: Reply with quote

Centurion

Joined: 14 Apr 2002
Posts: 105
Location: New Zealand

What about name lists? e.g.

for arguments sake lets say your third party application puts messages to Q1 (logical queue)

define a name list (called Q1 - this is not an actual queue) which contains the two queue names Q2 and Q3

the third party application opens & puts messages to the name list (Q1) and the same instance of the message will be put to Q2 & Q3

is this an option ?

Regards
_________________
J C Squire
IBM Certified Specialist - MQSeries
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Aug 15, 2002 5:20 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

JC, I think you meant Distribution Lists, not Namelists. The only thing you can do to a namelist is open it to do an MQINQ call to get a list of all the names on there.

Distribution List can be opened and PUT to, but are used to PUT to a whole bunch of queues with one open/put/close call. They require coding changes in that you must build the MQOR structure, where you have to go and fill in all the queue names one by one with your code.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
girish_tharwani
PostPosted: Thu Aug 15, 2002 5:28 am    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

Well , I am not sure if there is a way around it but I think a namelist can be opened with options MQOO_INQUIRE only. So you can not issue MQPUT on a namelist.
I tried opening a namelist with MQOO_OUTPUT option and got reason code 2045 (MQRC_OPTION_NOT_VALID_FOR_TYPE)
Back to top
View user's profile Send private message
girish_tharwani
PostPosted: Thu Aug 15, 2002 5:32 am    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

Actually, Since morning I am trying to experiment with Dist. list and yeah it needs some coding changes in app. But I am dealing with a third party product that can not be changed. So it seems I am stuck. I will have to do some coding.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Aug 15, 2002 5:57 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Hey Grand Masters (Brandon, etc) What do you think about the idea of an enhanced remote queue?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
bduncan
PostPosted: Thu Aug 15, 2002 8:07 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

In theory it sounds like a nice enhancement. However, in your example above, imagine what would happen if 1 of the 4 channels were down. You put the message to the remote queue, the queue manager sees it can deliver to 3 of the 4 destinations, whereas the last copy will sit on the transmission queue. What does it do? Should it behave as an all or nothing? Otherwise we can end up in a state where 3/4 copies made it, and the 4th is sitting on a transmission queue. Or extend it further, one of the 4 transmission queues is full, now the 4th message should go to the dead letter queue. Do we still send the other 3 copies?
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
PeterPotkay
PostPosted: Thu Aug 15, 2002 8:16 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Quote:
1 of the 4 channels were down. You put the message to the remote queue, the queue manager sees it can deliver to 3 of the 4 destinations, whereas the last copy will sit on the transmission queue. What does it do? Should it behave as an all or nothing?


I would say the same way that a Put to a regular remote queue def would work today if the channel were down. The message queues up and the app gets a RC of 0000. Today an app knows that only MQ got that message and will deliver it. A return code of 0000 does not mean that it even left the local QM, much less got delevired.

Quote:
Or extend it further, one of the 4 transmission queues is full, now the 4th message should go to the dead letter queue. Do we still send the other 3 copies?


This ones a little more tricky. I would say, yeah, let the 4th go to the DLQ and deliver the rest. But that doesn't sound all that good. What if as part of this enhancement the QM would know that the messages are part of a "group" and a new RC would indicate a XMIT queue error for a "group" put.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
jc_squire
PostPosted: Thu Aug 15, 2002 12:15 pm    Post subject: Reply with quote

Centurion

Joined: 14 Apr 2002
Posts: 105
Location: New Zealand

oh well, that was a bum call then ........
_________________
J C Squire
IBM Certified Specialist - MQSeries
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Aug 16, 2002 8:03 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If you are going to end up having to write some code, I'd suggest taking a look at the mirrorq sample in the software repository:

http://www.mqseries.net/pafiledb203/pafiledb.php?PHPSESSID=515f211dd2392e043fe195d6e4be8ce0&action=viewfile&fid=49&id=2

It is a C program that mirrors messages between two queues. It sounds like what you are looking for or at least a good place to look for pointers.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Copy of Message
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.