Hi Bryan,

The functionality to delay message delivery on a queue is not enabled by
default, as it might impact performance of message delivery [1].
You need to enable it either on individual queue or globally for queues on
broker/virtual host.
The former can achieved by setting queue attribute "holdOnPublishEnabled"
to "true".
The latter can be enabled by setting context variable
"queue.holdOnPublishEnabled" to "true" on broker or virtual host
accordingly.

Kind Regards,
Alex

[1]
http://qpid.apache.org/releases/qpid-broker-j-7.1.4/book/Java-Broker-Concepts-Queues.html#Java-Broker-Concepts-Queue-HoldingEntries


On Mon, 29 Jul 2019 at 13:02, Bryan Dixon <[email protected]> wrote:

> I'm using:
> Broker-J  7.0.2  (using Oracle Corporation 1.8.0_162-b12)
> Qpid JMS (AMQP 1.0) 0.44.0 (using Adopt OpenJDK jdk-11.0.3.7-openj9)
> Spring JMS  5.1.8
>
> I'm using the following JMS code to publish a message to a queue in
> Broker-J
> (using the amq-direct exchange) with a delayed delivery and the message
> never gets delivered to the destination queue:
>
> javax.jms.Destination destinaton =
> jmsTemplate.getDestinationResolver().resolveDestinationName(session,
> "app_delay_queue", jmsTemplate.isPubSubDomain());
>
> MessageProducer producer = session.createProducer(destinaton);
>
> producer.setDeliveryDelay(workRequest.getDelaySeconds() * 1000);
>
> Message message = jmsTemplate.getMessageConverter().toMessage(new
> TaskInfo(workRequest.getSomeWork(), workRequest), session);
>
> producer.send(message);
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to