is there a way to set the property Messaging.HDR_SCHEDULED_DELIVERY_TIME
with publish
?
@bja: you should be able to with (msg/publish q message :properties {"_HQ_SCHED_DELIVERY" (+ (System/currentTimeMillis) 5000)})
sweet, thanks!
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
but I could be wrong
let me know if you run in to any trouble
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
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
@bja: ^
hmm, that's an interesting option
thanks!
my pleasure!