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 Java / JMS » Real- time acknoledge response Message help!

Post new topic  Reply to topic
 Real- time acknoledge response Message help! « View previous topic :: View next topic » 
Author Message
bigmq
PostPosted: Thu Sep 30, 2004 7:14 am    Post subject: Real- time acknoledge response Message help! Reply with quote

Novice

Joined: 14 Sep 2004
Posts: 19

Hi, all
I am developing a application by using MQ base Java, here are some problems i am struggling at, since i am a newbie for MQ, any helps for my dump questions will be so appeciated!

When there is a new message coming into the queue, how do i know its coming and start my getmessage program to get the message out of queue right away? Any sample codes.

Thanks
Back to top
View user's profile Send private message
siliconfish
PostPosted: Thu Sep 30, 2004 8:27 am    Post subject: Reply with quote

Master

Joined: 12 Aug 2002
Posts: 203
Location: USA

You can set up the queue for TRIGTYPE=FIRST/EVERY/DEPTH (depending on ur situation) and set the Java program as the Triggered application. So when a message is put to a queue the queue manager generates a TRIIGGER message and your application can be triggered to pickup those messages from the application queue.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 30, 2004 8:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, he could use triggers.

Or he could read the Application Programming Guide to find out the best practices for this Request/Reply Pattern, and use Get with WAIT.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Sep 30, 2004 9:51 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

And if he is looking for sampel code, there is some on this site in the repository and there is also some at:

http://www.developer.ibm.com/tech/sampmq.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
bigmq
PostPosted: Thu Sep 30, 2004 11:10 am    Post subject: Reply with quote

Novice

Joined: 14 Sep 2004
Posts: 19

Many thanks for everybody, by the way, jefflowrey, your company doesn't call me.

I thought i could put my java program into a unix cron and run it like every 5 minutes to get message out and put back a acknoledge message to queue. This sound stupid, right?
Back to top
View user's profile Send private message
siliconfish
PostPosted: Thu Sep 30, 2004 11:23 am    Post subject: Reply with quote

Master

Joined: 12 Aug 2002
Posts: 203
Location: USA

Quote:
I thought i could put my java program into a unix cron and run it like every 5 minutes to get message out and put back a acknoledge message to queue. This sound stupid, right?


I don't think its a stupid idea.

Actually people do have use cron jobs to remove the expired/information messages but they run them at the end of the day or long intervals.
I am not sure how the 5min interval matters.
But IMO its a matter of design whether to use MQ facilities available to you out of the box or use non MQ.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 30, 2004 11:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

bigmq wrote:
Many thanks for everybody, by the way, jefflowrey, your company doesn't call me.


That's simply not true. My sales guy left you three messages, and you have not returned them.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Sep 30, 2004 11:46 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

bigmq wrote:
I thought i could put my java program into a unix cron and run it like every 5 minutes to get message out and put back a acknoledge message to queue. This sound stupid, right?


If your program is going to be running like this, I would suggest going with the triggering. If messages are this infrequent, you could set up a trigger type of every. Your program would get kicked off immediately and it could send its acknowledge message. Who wants to wait 5 minutes if you don't have to?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Real- time acknoledge response Message help!
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.