# RabbitMQ metadata

**URL:** <https://discuss.elastic.co/t/rabbitmq-metadata/46295>\
**Category:** Logstash\
**Created:** [April 4, 2016, 8:53pm UTC](https://discuss.elastic.co/t/rabbitmq-metadata/46295 "2016-04-04T20:53:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoaquinS](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@JoaquinS](https://discuss.elastic.co/u/JoaquinS)\
**Post date:** [April 4, 2016, 8:53pm UTC](https://discuss.elastic.co/t/rabbitmq-metadata/46295/1 "2016-04-04T20:53:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 5, 2016, 5:32am UTC](https://discuss.elastic.co/t/rabbitmq-metadata/46295/2 "2016-04-05T05:32:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Peterson\_Machado](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@Peterson\_Machado](https://discuss.elastic.co/u/Peterson_Machado)\
**Post date:** [April 8, 2016, 7:45pm UTC](https://discuss.elastic.co/t/rabbitmq-metadata/46295/3 "2016-04-08T19:45:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 10, 2016, 1:13pm UTC](https://discuss.elastic.co/t/rabbitmq-metadata/46295/4 "2016-04-10T13:13:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Peterson\_Machado](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@Peterson\_Machado](https://discuss.elastic.co/u/Peterson_Machado)\
**Post date:** [April 11, 2016, 12:09pm UTC](https://discuss.elastic.co/t/rabbitmq-metadata/46295/5 "2016-04-11T12:09:27Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:02am UTC](https://discuss.elastic.co/t/rabbitmq-metadata/46295/6 "2017-07-06T05:02:55Z")

</div>


