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
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
I have a list say
x = ["23gh", "56kh", "97mh"]
I would like to pass each element to Val in each iteration.
Say, in iteration 1 -------...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
Sometimes I want to check if the input into a function is not a blank string.
My first approach:
defmodule Example do
def do_stuff(s...
New
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work.
Or rather, not char, but a substr...
New
Other popular topics
Hello, I get Persian date from my client and convert it to normal calendar like this:
def jalali_string_to_miladi_english_number(persi...
New
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
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 folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
As a follow up to my earlier question:
I have the code compiling and running but not getting a successful login from the rest server. ...
New
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
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








