|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
use MQCB to read from a queue and write to a seperate queue |
« View previous topic :: View next topic » |
Author |
Message
|
yasaboy |
Posted: Wed Jun 25, 2014 2:23 pm Post subject: use MQCB to read from a queue and write to a seperate queue |
|
|
Voyager
Joined: 23 Jun 2014 Posts: 90
|
Hi,
I am very new to the MQ and need some help to figure out a way for the below scenario.
I have one MQ pair as INQueue and OutQueue. And I have two seperate threads where Thread1 reads messages from the INQueue and Thread2 process the same messages read from the InQueue and put to a OutQueue.
Can I use MQCB to read from INQueue , and pass the message back to Thread2.
Thanks  |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jun 25, 2014 2:49 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Moved to MQ API forum. _________________ 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 |
|
 |
bruce2359 |
Posted: Wed Jun 25, 2014 2:53 pm Post subject: Re: use MQCB to read from a queue and write to a seperate qu |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
yasaboy wrote: |
Hi,
I am very new to the MQ and need some help to figure out a way for the below scenario.
I have one MQ pair as INQueue and OutQueue. And I have two seperate threads where Thread1 reads messages from the INQueue and Thread2 process the same messages read from the InQueue and put to a OutQueue.
Can I use MQCB to read from INQueue , and pass the message back to Thread2.
Thanks  |
So, you are very new to MQ, and you have a solution using call-back? What is the problem your solution is addressing?
Is this a test question for a job interview? _________________ 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 |
|
 |
yasaboy |
Posted: Wed Jun 25, 2014 3:06 pm Post subject: Re: use MQCB to read from a queue and write to a seperate qu |
|
|
Voyager
Joined: 23 Jun 2014 Posts: 90
|
bruce2359 wrote: |
yasaboy wrote: |
Hi,
I am very new to the MQ and need some help to figure out a way for the below scenario.
I have one MQ pair as INQueue and OutQueue. And I have two seperate threads where Thread1 reads messages from the INQueue and Thread2 process the same messages read from the InQueue and put to a OutQueue.
Can I use MQCB to read from INQueue , and pass the message back to Thread2.
Thanks  |
So, you are very new to MQ, and you have a solution using call-back? What is the problem your solution is addressing?
Is this a test question for a job interview? |
Hi bruce.Thanks for your reply. I want to check the time between reading InQueue using MQCB and writing to OutQueue operation.
Not a interview question by the way  |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jun 25, 2014 3:13 pm Post subject: Re: use MQCB to read from a queue and write to a seperate qu |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
yasaboy wrote: |
I want to check the time between reading InQueue using MQCB and writing to OutQueue operation. |
You are very new to WMQ, and you want to check for what reason? Curiosity?
How do you intend to check the time? What do you intend to compare the result against?
What do you understand about the MQCB and related calls? _________________ 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 |
|
 |
pmeekin |
Posted: Thu Jun 26, 2014 2:53 am Post subject: Re: use MQCB to read from a queue and write to a seperate qu |
|
|
Novice
Joined: 13 Jan 2003 Posts: 10 Location: UK
|
yasaboy wrote: |
Can I use MQCB to read from INQueue , and pass the message back to Thread2. |
Hi yasaboy,
MQCB creates a function that gets messages asynchronously - it's a function within your program that gets invoked whenever a message arrives.
If you've already got 2 threads, do you really want thread 1 to get messages like this? Is it doing anything else while waiting for messages to arrive? If not then you probably don't need MQCB and a standard MQGET will be fine.
If you really want to give it a try check out the sample program amqscbf0.c which gives a simple example. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|