[
https://issues.apache.org/jira/browse/AMQ-8320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matt Pavlovich updated AMQ-8320:
--------------------------------
Summary: Implement JMS 2.0 DeliverDelay (was: Implement DeliverDelay)
> Implement JMS 2.0 DeliverDelay
> ------------------------------
>
> Key: AMQ-8320
> URL: https://issues.apache.org/jira/browse/AMQ-8320
> Project: ActiveMQ
> Issue Type: Sub-task
> Reporter: Matt Pavlovich
> Priority: Major
>
> Relevant sections from the JMS 2.0 specification:
> {noformat}
> 3.4.13.JMSDeliveryTime
> When a message is sent, the JMS provider calculates its delivery time by
> adding the delivery delay value specified on the send method to the time the
> message
> was sent(for transacted sends, this is the time the client sends the message,
> not the time the transaction is committed). It is represented as a long value
> which
> is defined as the difference, measured in milliseconds, between the delivery
> time time and midnight, January 1, 1970 UTC.On return from the send method,
> the
> message’s JMSDeliveryTime header field contains this value. When a message is
> received its JMSDeliveryTime header field contains this same value.A
> message's
> delivery time is the earliest time when a provider may make the message
> visible on the target destination and available for delivery to consumers.
> Clients must
> not receive messages before the delivery time has been reached.
> {noformat}
> {noformat}
> 7.9.Message delivery delay
> A client can specify a delivery delay value in milliseconds for each message
> it sends. This is used to determine the message’s delivery time which is
> calculated
> by adding the delivery delay value specified on the send method to the time
> the message was sent(for transacted sends, this is the time the client sends
> the
> message, not the time the transaction is committed).A message’s delivery time
> is the earliest time when a JMS provider may deliver the message to a
> consumer.
> The provider must not deliver messages before the delivery time has been
> reached.If a message is published to a topic, it will only be added to a
> durable or
> non-durable subscription on that topic if the subscription exists at the time
> the message is sent. An application may specify the required delivery delay
> using
> the method setDeliveryDelay on the producer object. This sets the delivery
> delay of all messages sent using that producer. Note however that the
> setDeliveryDelay method on Message cannot be used to set the delivery delay
> of a message.
> See also section 3.4.13 “JMSDeliveryTime”
> {noformat}
> Approach:
> 1. Use scheduler support to delay deliver of message until the specified time
> 2. Throw an exception from the Broker is the field is non-zero and scheduler
> support is disabled
> 3. MessageProducer sets JMSDeliveryTime header field value
> 4. Note: DeliveryDelay is not honored when set on the Message directly, must
> be set by the MessageProducer (similar to priority, expiry, etc)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)