This content has been marked as final.
Show 9 replies
-
1. Re: Message Scheduling
clebert.suconic Oct 2, 2008 11:02 AM (in response to ataylor)"ataylor" wrote:
A new packet will be created, say SessionScheduledSendMessage
Can't we use just a Header Property on the message for that?
on your clientProducer method:.... message.setLongProperty("JBM-SCHEDULED-TIME", scheduledTime); ...
I wouldn't put this on PageMessage, as the StorageManager will have the same problem. Say... If you restart the server with a message scheduled to be delivered at 8:00 AM next morning, you need to reload that from the journal/database also.
I would or add a Property on the Message in such way it would be part of the encoding. Or a message Property, or a field being part of the encoding. -
2. Re: Message Scheduling
ataylor Oct 2, 2008 11:29 AM (in response to ataylor)"clebert.suconic@jboss.com" wrote:
"ataylor" wrote:
A new packet will be created, say SessionScheduledSendMessage
Can't we use just a Header Property on the message for that?
on your clientProducer method:.... message.setLongProperty("JBM-SCHEDULED-TIME", scheduledTime); ...
Well we have a different send method completely so putting it on the message at send is redundant.I wouldn't put this on PageMessage, as the StorageManager will have the same problem. Say... If you restart the server with a message scheduled to be delivered at 8:00 AM next morning, you need to reload that from the journal/database also.
We add a record to the journal separately that marks a message as scheduled.I would or add a Property on the Message in such way it would be part of the encoding. Or a message Property, or a field being part of the encoding.
We could do this, I don't think it makes much difference, we just have to make sure that the delivery time is saved. -
3. Re: Message Scheduling
timfox Oct 2, 2008 11:31 AM (in response to ataylor)if a message is paged at its scheduled delivery time, then it's not in memory so it's clearly going to be late.
In other words don't worry about it -
4. Re: Message Scheduling
clebert.suconic Oct 2, 2008 11:34 AM (in response to ataylor)"timfox" wrote:
if a message is paged at its scheduled delivery time, then it's not in memory so it's clearly going to be late.
You could set scheduled delivery time for a few hours from now, right?
On that case you still need to save the delivery time on paging. -
5. Re: Message Scheduling
timfox Oct 2, 2008 11:47 AM (in response to ataylor)What I meant was, if a message is paged at its scheduled delivery time then of course its not going to get delivered then, since it's paged.
-
6. Re: Message Scheduling
ataylor Oct 2, 2008 11:56 AM (in response to ataylor)You could set scheduled delivery time for a few hours from now, right?
On that case you still need to save the delivery time on paging.
yes, We still need to save the delivery time. The question is how. we can set a property on the message itself,removing it on depage, or just add it in the encode/decode of PageMessage.
Whether or not its delivered on time is moot. -
7. Re: Message Scheduling
clebert.suconic Oct 2, 2008 12:34 PM (in response to ataylor)If you could avoid a different Packet it would be better, as we would need also to deal with that also later on LargeMessage
IMO If you put the scheduledTime somehow on MessageImpl or ClientMessageImpl anyway you want, it would solve the problem on Paging + Remoting + Journal with a single shot. -
8. Re: Message Scheduling
timfox Oct 2, 2008 12:40 PM (in response to ataylor)Scheduled time is store on the reference level, not the message level, so it needs to be a separate update record in the journal.
-
9. Re: Message Scheduling
clebert.suconic Oct 2, 2008 1:17 PM (in response to ataylor)"timfox" wrote:
Scheduled time is store on the reference level, not the message level, so it needs to be a separate update record in the journal.
Hmm... Ok..
then Andy was right about adding the field on PageMessage. It should be a simple change.