rabbitmq_message_timestamp plugin not working

85 views
Skip to first unread message

Andrew Gale

unread,
Mar 31, 2020, 11:26:09 AM3/31/20
to rabbitmq-users
I am using version 3.7.17 and confirmed that rabbitmq_message_timestamp plugin is enabled.  I restarted RabbitMQ service.

Per the documentation, I should expect to see timestamp property or timestamp_in_ms header of a message after doing a basicPublish.
But I am seeing neither when I consume a message via the Management page, or in my Visual studio project using the RabbitMQ client.  
In code when I consume the message, the timestamp is always 0.

Am I calling basicPublish incorrectly?          

         byte[] bytes = Encoding.UTF8.GetBytes(message);

         IBasicProperties props = model.CreateBasicProperties();
         props.ContentType = contentType;
         props.DeliveryMode = 2;
         props.Expiration = "3600";

         lock (model)
            model.BasicPublish(exchangeName, routingKey, props, bytes);

Luke Bakken

unread,
Mar 31, 2020, 11:49:59 AM3/31/20
to rabbitmq-users
Hi Andrew,

I can't reproduce this using RabbitMQ 3.8.3 or 3.7.24, Erlang 22.3 and this version of the plugin: https://github.com/rabbitmq/rabbitmq-message-timestamp/releases/tag/v3.8.0

As you can see in the attached screenshot, timestamps are added to the message I published using the management interface.
  • How exactly did you download and install the plugin?
  • What is the full output of rabbitmq-plugins list? Please capture the output to a file and attach the file to your response.
  • What operating system and Erlang version are you using?
Thanks,
Luke
message-with-timestamp.png

Andrew Gale

unread,
Mar 31, 2020, 12:07:26 PM3/31/20
to rabbitmq-users
Hi Luke, thank you for the quick response!

I followed these instructions:  https://www.rabbitmq.com/installing-plugins.html
I am using 3.7.17 and Erlang 22.0
OS:  Server 2016 Standard   version 1607

Output is attached.

Thanks!
plugins-output.txt

Luke Bakken

unread,
Mar 31, 2020, 12:12:20 PM3/31/20
to rabbitmq-users
Hi Andrew,

You mention using the RabbitMQ management web page in your first message, but that plugin isn't enabled in that output. Something is up with your installation.

Are you running the rabbitmq-plugins.bat command using the same administrative account that installed RabbitMQ?

Luke

Andrew Gale

unread,
Mar 31, 2020, 12:27:15 PM3/31/20
to rabbitmq-users
Hi Luke,
     I was logged in as a different user.  So I logged back in as Administrator, which was account used to install RabbitMQ.

The timestamp plugin was not enabled strangely, I guess it's account based.
So I went through the steps to enable it again, and restarted the RabbitMQ service.
Afterward, I confirmed that the plugin is enabled.

I purged the queue, but new messages are still not showing the timestamp.

Are we talking about the same management page?  It needs a plugin to function?

Luke Bakken

unread,
Mar 31, 2020, 12:30:36 PM3/31/20
to rabbitmq-users
Hi Andrew,

When running any RabbitMQ command-line tool you must be logged in as the same user that installed RabbitMQ.

Please provide the output of the rabbitmq-plugins.bat list command when logged in as your administrator account, as well as the complete log file. It is located in %AppData%\RabbitMQ\log. Feel free to zip the file before attaching it.

Yes, the RabbitMQ management web page (http://localhost:15762 by default) requires that the rabbitmq_management plugin be enabled.

Thanks,
Luke

Andrew Gale

unread,
Mar 31, 2020, 2:59:10 PM3/31/20
to rabbitmq-users
Luke,
  Turns out my coworker installed RabbitMQ as himself.

I reached out to him and had him install the plugin, and now the messages have the timestamp!

Kind of silly that we had to do that, but relieved that we finally got it working.

Thanks so much for your help !
Reply all
Reply to author
Forward
0 new messages