Broadway_rabbitmq empty metadata

Hi,

Testing broadway_rabbitmq 0.6.0 producer and I’m not able to get the metadata.

I can see the properties/headers from RabbitMQ web management queue page

app_id:	broker_producer
user_id:	guest
timestamp:	1589673281240
message_id:	eae5cfaf-279e-41f3-9c1a-3dadae63ac59
delivery_mode:	1
headers:	
merchant_id:	1234
content_type:	application/json

But cannot see the properties/headers on the Broadway.Message

%Broadway.Message{
  acknowledger: {BroadwayRabbitMQ.Producer,
   %AMQP.Channel{conn: %AMQP.Connection{pid: #PID<0.492.0>}, pid: #PID<0.552.0>},
   %{
     client: BroadwayRabbitMQ.AmqpClient,
     delivery_tag: 4,
     on_failure: :reject,
     on_success: :ack,
     redelivered: false
   }},
  batch_key: :default,
  batch_mode: :bulk,
  batcher: :default,
  data: "test",
  metadata: %{},
  status: :ok
}

I’m using a topic exchange with routing_key.

Thanks in advance,
Sergio

Update,

My bad :wink:

I should include :headers on the Broadway metadata options and not the actual header :yawning_face:

          metadata: [:headers,:user_id]

The on the Broadway.Message I receive

metadata: %{headers: [{"merchant_id", :longstr, "1234"}], user_id: "guest"},

Works perfectly the problem was between the chair and the keyboard.