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 » IBM MQ API Support » use MQCB to read from a queue and write to a seperate queue

Post new topic  Reply to topic
 use MQCB to read from a queue and write to a seperate queue « View previous topic :: View next topic » 
Author Message
yasaboy
PostPosted: Wed Jun 25, 2014 2:23 pm    Post subject: use MQCB to read from a queue and write to a seperate queue Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Wed Jun 25, 2014 2:49 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
bruce2359
PostPosted: Wed Jun 25, 2014 2:53 pm    Post subject: Re: use MQCB to read from a queue and write to a seperate qu Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
yasaboy
PostPosted: Wed Jun 25, 2014 3:06 pm    Post subject: Re: use MQCB to read from a queue and write to a seperate qu Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Wed Jun 25, 2014 3:13 pm    Post subject: Re: use MQCB to read from a queue and write to a seperate qu Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
pmeekin
PostPosted: Thu Jun 26, 2014 2:53 am    Post subject: Re: use MQCB to read from a queue and write to a seperate qu Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » use MQCB to read from a queue and write to a seperate queue
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.