|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Asynchronously receive message |
« View previous topic :: View next topic » |
Author |
Message
|
rtsujimoto |
Posted: Fri Mar 28, 2008 9:02 am Post subject: |
|
|
Centurion
Joined: 16 Jun 2004 Posts: 119 Location: Lake Success, NY
|
I'm not familiar with XMS, so this may be irrelevant. But, the functionality the poster wishes to emulate is an asynchronous, interruptable mechanism. Let's assume program-A has a defined subroutine-X that gets called when a message arrives. While program-A is waiting for a message it goes along its merry way doing other things. When a message does arrive, his processing is interrupted and control is given to subroutine-X. When the message is processed and the subroutine ends, control resumes at the point of interruption. Is this the sort of functionality XMS provides? |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Mar 28, 2008 9:25 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
XMS provides the capability of a message listener which listens for messages while the rest of your program is running along. When a message does arrive, it is given to the message listener.
I think this is exactly what the poster is looking for. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Apr 01, 2008 5:18 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9475 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
I want to get message asynchrously. |
What business requirement(s) lead you this as a technical solution?
As posted, z/OS allows for an mqgeting application to create an event control block that gets posted when a message arrives, thus freeing up the program to do other work. This kind of code is o/s-like, and requires other code to catch the interrupt, and do something about it.
This kind of behavior can be simulated (again, more tricky code) in environments that do not support hardware interrupts. You could write a program that does nothing more than loop an mqget call with no wait.
When something other than a 2033 is returned, this program can launch the program that has been waiting for a message to arrive. UNIX pipes enable this kind of chit-chat between processes.
Again, I'm curious why this is a technical requirement. _________________ 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 |
|
 |
zpat |
Posted: Tue Apr 01, 2008 11:38 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Websphere MQ v7 provides a call-back feature...! |
|
Back to top |
|
 |
mquser01 |
Posted: Sun Apr 27, 2008 9:30 pm Post subject: |
|
|
Acolyte
Joined: 06 Mar 2008 Posts: 52
|
can XMS be used with C++ for send/recv of large no of messages??
or functionality of XMS has to be implemented using i.e. either callback function or background thread |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 28, 2008 12:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mquser01 wrote: |
can XMS be used with C++ for send/recv of large no of messages?? |
Yes.
mquser01 wrote: |
functionality of XMS has to be implemented using i.e. either callback function or background thread |
It certainly has to be implemented. AFAIK it supports a callback listener function (as described in this thread) or running as a thread. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|