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 » Message Delay in MQ

Post new topic  Reply to topic
 Message Delay in MQ « View previous topic :: View next topic » 
Author Message
slm.ismail
PostPosted: Tue May 30, 2006 11:09 pm    Post subject: Message Delay in MQ Reply with quote

Newbie

Joined: 21 May 2006
Posts: 3

have some issues with MQ. Delay on messages is possible with MQ? . i.e once i put message in Q , I need to specify delay for that message. For different messages, this delay is different(4mins, 1min, 2 mins,..). Before putting message into Q, I have to specify this delay for that message and put into Q. Once the delay time is elapsed, that message should be ready to consume by other processor. Until that time, msg should not be dequeued by any processor.

Same functionality is there in Oracle AQ. While putting in AQ with pl/sql enqueue package, we can specify delay parameter. During delay period, that message will be in Wait state. After delay time it will be in ready state to consume.

Please let me know is it possible to implement with MQ...

While putting msg Into Q, some messages will come with 0 delay, some with 1 min delay, some with 2 min delay,....
Back to top
View user's profile Send private message
sieijish
PostPosted: Tue May 30, 2006 11:58 pm    Post subject: Reply with quote

Acolyte

Joined: 29 Nov 2004
Posts: 67
Location: London

What is the purpose of this delay? ASIF, there is no standard feature in MQ to do this.

You implement the delay in the application that puts the message in the Q.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 31, 2006 5:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Why bother sending a message until it's ready to be processed?

Isn't this exactly what databases are good for? Holding data for long periods of time?

Actually, there is a way to do this in MQ. It's a bit backwards, though.

You can set the message EXPIRY to the "delay" time, and make sure you specify that you want a expiration report with the full message data. Then you can have a process that will browse the original queue every second. Your actual receiving application then gets the report message on the replytoqueue and can extract the data from the report.

But I wouldn't do this.

What I might do is put the "delay" time in a user field in the MQRFH2 header, and then stick every incoming message on a holding queue, and associate that delay time with the Message ID. Then when I know the delay time is up, I can do a GET on that message id.

But probably I'd rethink the entire design in the first place.
_________________
I am *not* the model of the modern major general.
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 Java / JMS » Message Delay in MQ
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.