Re: Mail queue

2007-06-16 Thread James Strachan
I agree with everything everyone's said so far in this thread. Another thought; if all the messages are added to the queue in the order they want to be delivered; its just there needs to be an hour lag from the message send, to the message receive, you could do this just using a sleep in your co

Re: Mail queue

2007-06-15 Thread Mario Siegenthaler
Somebody proposed in a different thread to use a MessageSelector to only select the messages that are at least an hour old. You could set a message-property to System.currentTimeMillis() and then create a selector with "SendTime < "+(System.currentTimeMillis()-360). You'd have to recreate your

Re: Mail queue

2007-06-15 Thread Gaurav Hariani
I would approach this using persistent messages. Your webapp creates a persistent message adds the time (as a property maybe) at which the message should be sent as email and puts it on a queue. Another application can regularly poll the queue for messages that are ready to be emailed. That

Mail queue

2007-06-15 Thread Hehl, Thomas
I new to JMS and messaging in general and would like a little advice. In my application, I have a java webapp that sends e-mails. For reasons too complicated to explain, my client wants an hour lag time between the time the e-mail is created and the time it is sent, so I need to park it somewhe