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 » Question on distributed queuing

Post new topic  Reply to topic
 Question on distributed queuing « View previous topic :: View next topic » 
Author Message
yeahyeah
PostPosted: Fri Nov 10, 2006 8:08 pm    Post subject: Question on distributed queuing Reply with quote

Novice

Joined: 06 Aug 2006
Posts: 18
Location: HK

Here is my question, can i send to and receive from the same queue at remote machine, using distributed queuing?
To the best of my knowledge, a message channel is a one way link only. But if i use two of this message channel, and set queue at remote machine as the transmission queue of the second channel, application at remote machine end up with no message provided. Am i correct?
If this is not the case...any way to do this? I have to use the same queue at remote machine because i have to perform destructive get on it, making sure the remote application gets nothing afterwards.

Thanks
Yeah
Back to top
View user's profile Send private message
xxx
PostPosted: Fri Nov 10, 2006 9:18 pm    Post subject: Reply with quote

Centurion

Joined: 13 Oct 2003
Posts: 137

You can get messages only from a local Queue,

Also you cannot pull messages from a xmitq on the remote machine , it will be a local queue, It has to pass through the channel and land on a local Queuemanger Local Queue,
--------------------------------------------------------------

If you insist that you will have one Queue , then Use a client MQ application, and connect to Remote QManger and put the message on the local Queue of Remote Quemanger ,( with MID an CorrID) ,
and wait for the reply on the Qmanger .
Back to top
View user's profile Send private message
hopsala
PostPosted: Sat Nov 11, 2006 2:29 am    Post subject: Re: Question on distributed queuing Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

I'm sorry to say, but it seems to me that you really got things confused here; though perhaps I misunderstood. I'll try to answer anyway.
yeahyeah wrote:
Here is my question, can i send to and receive from the same queue at remote machine

No, WMQ doesn't work that way, nor should it.If you think it should, than you don't understand it fully. Sending applications send to remote queues, receiving applications receive from local queues, that's the way it goes.
yeahyeah wrote:
But if i use two of this message channel, and set queue at remote machine as the transmission queue of the second channel, application at remote machine end up with no message provided. Am i correct?

Perhaps, but why do this? If you wish to return the message to sender, why send it in the first place?
yeahyeah wrote:
If this is not the case...any way to do this? I have to use the same queue at remote machine because i have to perform destructive get on it, making sure the remote application gets nothing afterwards.

please elaborate on this- What EXACTLY are you trying to achieve here? (a step-by-step explanation would be helpful)
Back to top
View user's profile Send private message
yeahyeah
PostPosted: Sun Nov 12, 2006 5:23 pm    Post subject: Re: Question on distributed queuing Reply with quote

Novice

Joined: 06 Aug 2006
Posts: 18
Location: HK

hopsala wrote:
I'm sorry to say, but it seems to me that you really got things confused here; though perhaps I misunderstood. I'll try to answer anyway.
yeahyeah wrote:
Here is my question, can i send to and receive from the same queue at remote machine

No, WMQ doesn't work that way, nor should it.If you think it should, than you don't understand it fully. Sending applications send to remote queues, receiving applications receive from local queues, that's the way it goes.
yeahyeah wrote:
But if i use two of this message channel, and set queue at remote machine as the transmission queue of the second channel, application at remote machine end up with no message provided. Am i correct?

Perhaps, but why do this? If you wish to return the message to sender, why send it in the first place?
yeahyeah wrote:
If this is not the case...any way to do this? I have to use the same queue at remote machine because i have to perform destructive get on it, making sure the remote application gets nothing afterwards.

please elaborate on this- What EXACTLY are you trying to achieve here? (a step-by-step explanation would be helpful)


I gonna elaborate my question some how, sorry for my vague question above...
Say A and B are two clients at two machines and there's a queue C. Let me explain what i do when i use server-connection:
1. A sends message to queue C.
2. B retrieve message from C, obviously.
3. When queue C is full, A detects it and performs a destructive get to clear the queue. Perhaps this occurs only when B is not waiting for message.
That's pretty easy with server-connection since only one QM is needed. Yet I don't know can i do this (especially case 3) with distributing queueing + binding conenction mode?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Nov 12, 2006 10:23 pm    Post subject: Re: Question on distributed queuing Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

yeahyeah wrote:

I gonna elaborate my question some how, sorry for my vague question above...
Say A and B are two clients at two machines and there's a queue C. Let me explain what i do when i use server-connection:
1. A sends message to queue C.
2. B retrieve message from C, obviously.
3. When queue C is full, A detects it and performs a destructive get to clear the queue. Perhaps this occurs only when B is not waiting for message.
That's pretty easy with server-connection since only one QM is needed. Yet I don't know can i do this (especially case 3) with distributing queueing + binding conenction mode?
What business case prompts you for scenario 3? To me this scenario makes absolutely no sense...and does not fit any accepted patterns...

Can you please make a business case for scenario 3 ?

Thanks
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Nov 13, 2006 1:34 am    Post subject: Re: Question on distributed queuing Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

yeahyeah wrote:
hopsala wrote:
I'm sorry to say, but it seems to me that you really got things confused here; though perhaps I misunderstood. I'll try to answer anyway.
yeahyeah wrote:
Here is my question, can i send to and receive from the same queue at remote machine

No, WMQ doesn't work that way, nor should it.If you think it should, than you don't understand it fully. Sending applications send to remote queues, receiving applications receive from local queues, that's the way it goes.
yeahyeah wrote:
But if i use two of this message channel, and set queue at remote machine as the transmission queue of the second channel, application at remote machine end up with no message provided. Am i correct?

Perhaps, but why do this? If you wish to return the message to sender, why send it in the first place?
yeahyeah wrote:
If this is not the case...any way to do this? I have to use the same queue at remote machine because i have to perform destructive get on it, making sure the remote application gets nothing afterwards.

please elaborate on this- What EXACTLY are you trying to achieve here? (a step-by-step explanation would be helpful)


I gonna elaborate my question some how, sorry for my vague question above...
Say A and B are two clients at two machines and there's a queue C. Let me explain what i do when i use server-connection:
1. A sends message to queue C.
2. B retrieve message from C, obviously.
3. When queue C is full, A detects it and performs a destructive get to clear the queue. Perhaps this occurs only when B is not waiting for message.
That's pretty easy with server-connection since only one QM is needed. Yet I don't know can i do this (especially case 3) with distributing queueing + binding conenction mode?


Traditionally, most sites respond to your scenarion 3 by starting more instances of B or taking other actions to process the messages faster rather than just deciding the messages are useless and clearing the queue off. Most messages tend to contain importantion information, or at least information that was supposed to go somewhere...

Also, and this is a bit purist, it implies A is aware that B isn't working (because C is filling up) and takes action. This is against the decoupled message model; A should submit the message and walk away from the process.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
yeahyeah
PostPosted: Mon Nov 13, 2006 2:02 am    Post subject: Re: Question on distributed queuing Reply with quote

Novice

Joined: 06 Aug 2006
Posts: 18
Location: HK

fjb_saper wrote:
What business case prompts you for scenario 3? To me this scenario makes absolutely no sense...and does not fit any accepted patterns...

Can you please make a business case for scenario 3 ?

Thanks


I need to do this because this is a real time system, A is sending stock information and B needs them for calculation. When the queue is full then the messages B obtain would probably out of date. I decided to prevent this by clearing the queue.

So the answer is no?...

Thank you.
Yeah
Back to top
View user's profile Send private message
yeahyeah
PostPosted: Mon Nov 13, 2006 2:05 am    Post subject: Re: Question on distributed queuing Reply with quote

Novice

Joined: 06 Aug 2006
Posts: 18
Location: HK

Vitor wrote:

Traditionally, most sites respond to your scenarion 3 by starting more instances of B or taking other actions to process the messages faster rather than just deciding the messages are useless and clearing the queue off. Most messages tend to contain importantion information, or at least information that was supposed to go somewhere...


Right, and that's exactly what i am doing. So this is the case whenever B is dead.......
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Nov 13, 2006 2:15 am    Post subject: Re: Question on distributed queuing Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

yeahyeah wrote:

Right, and that's exactly what i am doing. So this is the case whenever B is dead.......


Then if B is dead the proper response is to spin up another instance of B, using a high-availability technique if B had died because the box has died.

There are a number of MQ solutions to spinning up another instance of B; MQ triggering is one, high-availability software another or something like BMC Patrol monitoring the app. This is much better than trying to build a feedback loop into A.

Touching back on your other answer, if the messages B processes can go out of date you can set their Expiry attribute. Once expired they don't count towards queue depth and it will save processing within B to work out if it's got an old message. Old (expired) messages will not be presented to B by MQ.

Short answer to your original question is no, you can't do what you're trying to do.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
yeahyeah
PostPosted: Mon Nov 13, 2006 2:28 am    Post subject: Re: Question on distributed queuing Reply with quote

Novice

Joined: 06 Aug 2006
Posts: 18
Location: HK

Vitor wrote:
yeahyeah wrote:

Right, and that's exactly what i am doing. So this is the case whenever B is dead.......


Then if B is dead the proper response is to spin up another instance of B, using a high-availability technique if B had died because the box has died.

There are a number of MQ solutions to spinning up another instance of B; MQ triggering is one, high-availability software another or something like BMC Patrol monitoring the app. This is much better than trying to build a feedback loop into A.

Touching back on your other answer, if the messages B processes can go out of date you can set their Expiry attribute. Once expired they don't count towards queue depth and it will save processing within B to work out if it's got an old message. Old (expired) messages will not be presented to B by MQ.

Short answer to your original question is no, you can't do what you're trying to do.


Thanks for reply and i appreciate it.
For high availability solution, i am doing it at server level, not app level so B won't reborn.
Seems expire value is a better solution but i wonder if it works with JMS? Or i need to use IBM interface to make message "disappear" once they expired.

Big thanks!
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Nov 13, 2006 2:40 am    Post subject: Re: Question on distributed queuing Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

yeahyeah wrote:

Thanks for reply and i appreciate it.
For high availability solution, i am doing it at server level, not app level so B won't reborn.


Then have a look into triggering. Not entirely ideal but may offer a safety net.

yeahyeah wrote:

Seems expire value is a better solution but i wonder if it works with JMS? Or i need to use IBM interface to make message "disappear" once they expired.


Urgh... Java is not my thing and I stand ready to be corrected, but I believe MQMD.Expiry is exposed in the JMS as JMSExpiration and can set set either by the send() method or as an attribute of a JMS Destination. I urge you to consult the Java MQ documentation for more definiative information.

However it's set, IMHO JMS is just a wrapper over the IBM interface. Hence expired messages disappear when you try to receive them with JMS just like they do on an MQGET, because an MQGET is what you're actually using under the covers.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 13, 2006 3:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

To avoid stale information I would certainly go with expiration.
I believe it is an attribute of the sender. It can certainly be passed in one of the overloaded send methods...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Question on distributed queuing
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.