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.
0
Popular in Questions
lets say i have a sample like
a = 20; b = 10;
if (a > b) do
{:ok, "a"}
end
if (a < b) do
{:ok, b}
end
if (a == b) do
{:ok, "equa...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
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
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Other popular topics
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
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
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
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
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Hello everyone,
Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









