sblabreu
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
Marked As Solved
sblabreu
Update,
My bad 
I should include :headers on the Broadway metadata options and not the actual header 
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.
Popular in Questions
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hi,
is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
Hi all,
I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I'm trying to use Postg...
New
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
I have a super simple question about elixir - how would I take a file like this
foo bar baz
and output a new file that enumerates th...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
Other popular topics
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New







