0

I m using apache qpid as a broker for writing junits. My use case requires to use delayed message functionality in tests. so does qpid supports this , like rabbitmq. I s there any plugin available which i can write in qpid json file.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
vipulk10
  • 117
  • 3
  • 15

1 Answers1

2

I assume since your question is tagged 'junit' you are writing your unit tests in Java and are probably embedding the Apache Qpid Broker-J.

Delivery delay is supported. You don't need a plugin. It is described here:

https://qpid.apache.org/releases/qpid-broker-j-7.0.6/book/Java-Broker-Concepts-Queues.html#Java-Broker-Concepts-Queue-HoldingEntries

As discussed in the document, you must turn on the feature at the queue level and from the client side indicate your wish for the delivery to be delayed. To do this pass a message annotation (if using AMQP 1.0) or a message header (if using the older AMQP protocols).

If you are using the JMS 2.0 compatible client life is easy. Access the feature via the JMS 2.0 API MessageProducer#setDeliveryDelay() or JMSProducer#setDeliveryDelay().

k-wall
  • 409
  • 3
  • 9