RabbitMQ metadata

Hi I'm trying to use the message-id metadata propertie of RabbietMQ input. But it doesn't worked for me. I set metadata_enable => true, and tryied:

add_field => {"primary_key" => "%{[@metadata][rabbitmq_properties][message-id]}"}
add_field => {"primary_key" => "%{[@metadata][message-id]}"}
add_field => {"primary_key" => "[@metadata][rabbitmq_properties][message-id]"}
add_field => {"primary_key" => "[@metadata][message-id]"}

And I don't know what else to try.

What does the @metadata field look like? Use a stdout { codec => rubydebug { metadata => true } } output to find out.

Hi,
I have the same problem. (I'm using logstash version 2.3 - metadata_enabled => true)

I tried magnusbaeck sugestion but no properties field from RabbitMQ message are printed in console (only the "payload" fields)

Look's like logstash-input-rabbit is not exporting RabbitMQ properties field into @metadata.

That's odd. The integration tests for 4.0.1 of the plugin (the one in Logstash 2.3.0) certainly pass. Can you please use the plugin command to double-check which version of the plugin you're running?

My Logstash installation is somehow hosed and I don't have time to fix it now to check for myself.

Hi,
I'm new to logstash, and I don't know this plugin command.

BUT, today I saw a new version of logstash for download (2.3.1), and I decided to try this new version. Luckily in this version the properties are correctly filled, and the command you suggested (stdout { codec => rubydebug { metadata => true } }) now prints the values.

In short, update to version 2.3.1 of logstash and the problem is gone!

Thanks!