[rabbitmq-discuss] regarding time-stamp

Emile Joubert emile at rabbitmq.com
Tue Jul 24 10:29:15 BST 2012


On 24/07/12 09:55, Vadiraj Hebbar wrote:
> how to set time-stamp flag to message in Java client  rabbitMQ.
> please explain with sample code.

Here is an example that sets the timestamp property:

AMQP.BasicProperties props =
  new AMQP.BasicProperties.Builder().timestamp(new Date()).build();
channel.basicPublish(exchange, queue, props, payload);

If you require more control over the format and precision of your
timestamp then consider setting a header instead.


More information about the rabbitmq-discuss mailing list