Azure Service Bus has capability to send scheduled messages. Sending scheduled messageses with AMQP protocol described here: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-request-response#message-operations
Schedules messages. Request
The request message must include the following application properties:
| Key | Value | Type | Required | Value Contents
| operation | string | Yes | com.microsoft:schedule-message
| com.microsoft:server-timeout | uint | No | Operation server timeout in milliseconds.|
I work with Azure Service Bus with java JmsTemplate from Spring Framework. How map message headers to send scheduled message?
@Test
public void sendMessageWithHeaders() {
jmsTemplate.send("test-topic-2", new MessageCreator() {
@Override
public Message createMessage(Session session) throws JMSException {
TextMessage textMessage = session.createTextMessage("test-123");
((JmsTextMessage) textMessage).setValidatePropertyNames(false);
textMessage.setStringProperty("operation", "com.microsoft:schedule-message");
textMessage.setIntProperty("com.microsoft:server-timeout", 100000);
return textMessage;
}
});
}
-produce ordinal message