Fork me on GitHub
#immutant
<
2017-01-09
>
bja20:01:39

is there a way to set the property Messaging.HDR_SCHEDULED_DELIVERY_TIME with publish?

tcrawley20:01:55

@bja: you should be able to with (msg/publish q message :properties {"_HQ_SCHED_DELIVERY" (+ (System/currentTimeMillis) 5000)})

bja20:01:16

sweet, thanks!

tcrawley20:01:08

just be aware that there is some oddness around scheduled messages. IIRC, a listener has to be registered at the time the message is scheduled to be able to get it when it is delivered

tcrawley20:01:18

but I could be wrong

tcrawley20:01:42

let me know if you run in to any trouble

bja20:01:55

I plan on testing it out. Looking for a lightweight way of delaying messages for up to an hour. SQS has a limit of 15 minutes, so next on the list was HornetQ

tcrawley20:01:50

another option would be to send the messages via Quartz. you could use immutant.scheduling, and do (scheduling/schedule #(msg/publish q message) :in [5 :seconds]) which would work with SQS

bja21:01:32

hmm, that's an interesting option

tcrawley21:01:40

my pleasure!