Author |
Message
|
sc |
Posted: Thu Feb 26, 2004 11:38 am Post subject: connect two local queues on the same qmgr |
|
|
Novice
Joined: 06 Sep 2003 Posts: 16
|
Can I define two local queues on the same QMgr then connect them together? Say if I put message on local Queue A it will then automatically send to another local Queue B.
The reason is that the max depth for local queue is 640K and we like the larger number than that. Also the applications are sharing the same QMgr.
Thanks. |
|
Back to top |
|
 |
EddieA |
Posted: Thu Feb 26, 2004 11:54 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
What exactly are you trying to do:
Copy every message that it sent to Queue A to Queue B as well. http://www.mqseries.net/phpBB2/viewtopic.php?t=13682&highlight=
Do you want to use Queue A instead of Queue B. Use an Alias.
Do you want Queue B to be used when Queue A fills up. Change your applications. But you might have fun and games trying to keep the messages in the same sequence.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
offshore |
Posted: Thu Feb 26, 2004 12:11 pm Post subject: |
|
|
 Master
Joined: 20 Jun 2002 Posts: 222
|
Why is max depth only @ 640K?
Is that a "business requirement?", because you can certainly go larger than that. |
|
Back to top |
|
 |
sc |
Posted: Thu Feb 26, 2004 12:47 pm Post subject: |
|
|
Novice
Joined: 06 Sep 2003 Posts: 16
|
On solaris, the max depth you can set for the local queue is 640K. It is MQ-specified limit. |
|
Back to top |
|
 |
sc |
Posted: Thu Feb 26, 2004 12:53 pm Post subject: |
|
|
Novice
Joined: 06 Sep 2003 Posts: 16
|
Thanks for the reply.
Currently we used Queue Alias for Application A putting messages then Application B retrieving from there. Sometimes the receiving is slower than then sending so it could fill up 640K local queue quickly. I am thinking if I can connect two local queues together then it could hold about 1.2M messages.
Is there a way similar to distributed queuing mechanism that I can define remote queue/xmit queue on the one QMgr? |
|
Back to top |
|
 |
offshore |
Posted: Thu Feb 26, 2004 1:15 pm Post subject: |
|
|
 Master
Joined: 20 Jun 2002 Posts: 222
|
sc,
sorry for the mixup! i had a line down somewhere.....i was thinking in message size. |
|
Back to top |
|
 |
fschofer |
Posted: Thu Feb 26, 2004 1:57 pm Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Which Version of MQ do you use ?
According to MQ 5.3 "Script (MQSC) Command Reference" you can
use up to 999 999 999 messages with Solaris.
MAXDEPTH(integer)
The maximum number of messages allowed on the queue.
This parameter is supported only on local and model queues.
On AIX, Compaq OpenVMS, HP-UX, Linux, OS/400, Solaris, Windows,
and z/OS, specify a value in the range zero through 999 999 999.
On any other WebSphere MQ platform, specify a value in the range zero
through 640 000.
Other factors can still cause the queue to be treated as full, for example, if
there is no further DASD space available.
If this value is reduced, any messages that are already on the queue that
exceed the new maximum remain intact. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Feb 26, 2004 3:31 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If Application A is able to put messages faster than Application B can get them, why not start up another copy of Application B? You could potentially trigger based on queue depth to know when things are getting bad. |
|
Back to top |
|
 |
sc |
Posted: Fri Feb 27, 2004 12:48 pm Post subject: |
|
|
Novice
Joined: 06 Sep 2003 Posts: 16
|
We cannot start another application to consume messages becasue the order of the messages is very important. The messages need be retrieved then applied to database. Two concurrent applcation could mess things up. |
|
Back to top |
|
 |
EddieA |
Posted: Fri Feb 27, 2004 12:58 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
the order of the messages is very important |
In which case, even if MQ could do this:
Quote: |
I am thinking if I can connect two local queues together then it could hold about 1.2M messages |
Which it can't. Or if you somehow do it via an application, you couldn't use it.
Queue A fills, messages start going to Queue B. Your application starts reading from Queue A, which is no longer full. New messages now go to Queue A, whhich will be read before Queue B.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Feb 28, 2004 10:21 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
sc, you never answered what version of MQ you are on. At 5.3, you can make the queue depth up to 999 999 999, even on Solaris. Upgrading to 5.3 may be the easiest solution.
A real screwy solution may be to have the sending app send a control message every 250,000 messages. This control message would tell the receiving app to switch queues.
Sending App puts 250,000 messages to Queue1.
Sending App puts "Switch to Queue2" message on Queue1.
Sending App puts 250,000 messages to Queue2.
Sending App puts "Switch to Queue1" message on Queue2.
meanwhile.....
RCVR App stays on Queue1, going MQGETs with waits, until it sees the switch message, at which point it close Queue1, and opens Queue2. It stays there until it sees the next switch queues message.
You could code sequence numbers into the CorrelationID field of all the messages. The RCVR app could then know for certain that the chain has not been broken.
Like I said, a screwy solution. But, as soon as you introduce Message Affinities (message order is important), this is what you get yourself into. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
sc |
Posted: Tue Mar 09, 2004 2:51 pm Post subject: |
|
|
Novice
Joined: 06 Sep 2003 Posts: 16
|
Thanks for all the replies.
We are planning to upgrade to V5.3 and will set maxdepth to 999 999 999.
Another question:
When sometimes RECV application is slower SEND applicaiton, the messages could reach max depth on the local RECV queue and overflowed messages will wind up on DLQ. At the same time, RECV application is still reading and processing and SEND Application is still sedning, so messages on DLQ won't be read immediately. The message order cannot be maintained in this case.
I am thinking to disable Dead Letter Queue or setup DLQ max depth to 0.
Is it the right solution for this problem? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Mar 09, 2004 3:17 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
If the MCA cant put to the destination queue, and then can't out to the DLQ, the channel STOPs. Now messages pile up in the transmit queue on the other side (for all applications trying to use this channel) until you manually restart the channel. If the XMIT queue fills up, then all your apps start getting errors on their MQPUTS.
I better solution is to look at the Message Retry Counts and Intervals on the RCVR channel. You can set it so that the MCA waits some time before retrying to PUT the message again, and you can have this happen X times. Hopefully by then, the consuming app will have drained the queue a little, and the mesage will go in order to the input queue.
Of course if the Message Retries happen and the queue is still full, the messages will go to the DLQ. I would think this would only happen if the consuming app was completly stopped, in which case the order will still be preserved in the DLQ.
Running without a DLQ opens you up to the possability of channels stopping and requiring manual intervention at the smallest problem.
BLAH!!!  _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Michael Dag |
Posted: Tue Mar 09, 2004 3:36 pm Post subject: Re: connect two local queues on the same qmgr |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
sc wrote: |
Can I define two local queues on the same QMgr then connect them together? Say if I put message on local Queue A it will then automatically send to another local Queue B.
The reason is that the max depth for local queue is 640K and we like the larger number than that. Also the applications are sharing the same QMgr.
Thanks. |
Just curious... what exactly are you trying to achieve?
are the putting and getting app on the same machine?
or are you using client connections?
sounds like you are putting files as messages to the queue in one go... _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
csmith28 |
Posted: Tue Mar 09, 2004 4:11 pm Post subject: @sc |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
MAXDEPTH is not measured in bytes it is measured in messages and like Potkay said you can set that to be as high as 999999999. That is the maximum number of messages that be place on the Local Queue at any given time before they start getting either rejected in the event that the message is being place from a client or they go to the SYSTEM.DEAD.LETTER.QUEUE or another defined dead letter queue.
MAXMSGL is measured in bytes and this attribute defines the maximum size of a message that is allowed to be placed on a local queue. If you do not manually define this attribute it will default to 4meg (4194304 bytes) but it can be set to as high as 100meg (per the MQAdmin Guide for 5.3) though you would need to have quite a bit of space in /var/mqm/log to handle messages that large and you will have to configure your logs to handle that much especially if the messages are Persistant.
You may be better off altering these attributes than trying to create a second Local Queue. Note: if you do this you will may also have to alter the MAXMSGL for the MQManager, SYSTEM.DEAD.LETTER.QUEUE the Transmit Queue and any channels that put or get messages off of that Local Queue.
Hope this helps...  _________________ Yes, I am an agent of Satan but my duties are largely ceremonial.
Last edited by csmith28 on Tue Mar 09, 2004 4:13 pm; edited 1 time in total |
|
Back to top |
|
 |
|