0

I'm working on a java application that needs to send message to Azure service bus such that message is available to the next process after certain delay.

Using Azure sdk, it can be achieved by setting setScheduledEnqueueTimeUtc BrokerProperty on the Brokered message, but I'm unable to find an equivalent of this in AMQP/JMS world.

Using Message.setProperty with a key,value pair results in property being put under application property and the message appears in queue immediately.

Is there a way to achieve this delay?

Ani
  • 1,655
  • 3
  • 23
  • 37

1 Answers1

0

JMS 2.0 specifications define "delivery delay" feature which lets a message to be delivered after specified time duration. See here http://www.oracle.com/technetwork/articles/java/jms2messaging-1954190.html for more details. You will need a messaging provider that implements JMS 2.0 specification.

Shashi
  • 14,980
  • 2
  • 33
  • 52
  • Thanks Shashi, upgraded to JMS2.0 but getting the following error that suggests Azure might not be supporting it yet -- `Error message: Uncategorized exception occurred during JMS processing; nested exception is javax.jms.JMSException: Remote does not support delayed message delivery` – Ani Mar 06 '17 at 13:27
  • It appears that you upgraded you JMS client to 2.0 but not the messaging provider. Both JMS client and messaging providers must be updated to support delivery delay. Which messaging provider are you using? – Shashi Mar 06 '17 at 14:01
  • spring-jms v4.3.3 with qpid-jms-client v0.20.0 – Ani Mar 07 '17 at 15:19