activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Siegenthaler" <mario.siegentha...@gmail.com>
Subject Re: Mail queue
Date Fri, 15 Jun 2007 21:19:42 GMT
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()-3600000).
You'd have to recreate your consumer in a certain interval since
unfortunatly time passes by itself :)

Mario

On 6/15/07, Gaurav Hariani <g.activemq@blackspark.com> wrote:
> 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 way if the webapp, the application that does the mailing or the
> broker dies and comes back up, the messages are not lost.
>
> Gaurav
>
>
> Hehl, Thomas wrote:
> > 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
> > somewhere.
> >
> >
> >
> > The problem is that I want them to be able to shutdown (or even crash) my
> > server, re-start, then have the messages take back off again like nothing
> > ever happened. It seemed like something activeMQ might be well suited for.
> >
> >
> >
> > Am I barking up the wrong tree? Has anyone done anything like this?
> >
> >
> >
> > Thanks.
> >
> >
> >
> > Thom Hehl
> > Sr. eJuror Architect
> >
> > * Office (859) 277-8800 x 144
> >
> > * Thomas.Hehl@acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
> > ACS, Inc.
> >
> > Government Solutions
> >
> > 1733 Harrodsburg Road
> > Lexington, KY 40504-3617
> >
> > This e-mail message, including any attachments, is for the sole use of the
> > intended recipient(s) and may contain confidential and privileged
> > information. Any unauthorized review, use, disclosure or distribution is
> > prohibited. If you are not the intended recipient, please contact the sender
> > by reply e-mail and destroy all copies of the original message and notify
> > sender via e-mail at Thomas.Hehl@acs-inc.com
> > <mailto:Thomas.Hehl@acs-inc.com>  or by telephone at 859-277-8800 ext. 144.
> > Thank you.
> >
> >
> >
> >
> >
>

Mime
View raw message