[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Message Scheduling

ataylor do-not-reply at jboss.com
Thu Oct 2 08:40:30 EDT 2008


This is how i propose we handle message scheduling.

Firstly the send method in ClientProducer will be overridden with a new parameter (long) to allow the scheduled time of message delivery to be specified. A new packet will be created, say SessionScheduledSendMessage, which will extend SessionSendMessage and have a scheduled time attribute.

In ServerSession when we send the message if the scheduled delivery time is set and it is not involved in a tx we route the message and then update the references with the scheduled delivery time.  If the message is persisted we then add a ''SET_SCHEDULED_DELIVERY_TIME' record. This is so on reload we can reschedule the messages. We then add to the queue as a scheduled message and the current queue code will take care of delivering when ready. If the message is part of a tx,we add it to the transaction marked as a scheduled message and on commit the messages will be handled the same way. 

One slight problem is how do we deal with this during page since when the message is depaged we won't know it was to be scheduled. Tim suggested adding and removing a property on page/depage, We could do this simply by adding a property to PageMessage and change the page method to have an additional oprtional property, Clebert any thoughts?

Lastly on a JMS layer, it would work as in 1.4, I.e. you set a property on the message and we decide on send how to send it.

comments!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180010#4180010

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180010



More information about the jboss-dev-forums mailing list