hqoss / rabbit_mq Goto Github PK
View Code? Open in Web Editor NEW๐ Build consistent and well-balanced Producer/Consumer pipelines
License: MIT License
๐ Build consistent and well-balanced Producer/Consumer pipelines
License: MIT License
I'm trying to do the following but can't:
defmodule Tmp2.QConfig do
def configuration do
%{
Tmp2.Foo.Queue1 => [exchange: "example_queue", worker_count: 3],
Tmp2.Foo.Queue2 => [exchange: "other_queue", worker_count: 2]
}
end
end
defmodule Tmp2.Foo do
for {module, options} <- Tmp2.QConfig.configuration() do
defmodule module do
use RabbitMQ.Producer, options
@impl true
def handle_publisher_nack(unackd_messages) do
Logger.error("Failed to publish messages: #{inspect(unackd_messages)}")
end
end
end
end
This fixes the problem (producer.ex):
Change from:
@confirm_type unquote(Keyword.get(opts, :confirm_type, :async))
@exchange unquote(Keyword.fetch!(opts, :exchange))
@worker_count unquote(Keyword.get(opts, :worker_count, 3))
To:
@confirm_type Keyword.get(unquote(opts), :confirm_type, :async)
@eXchange Keyword.fetch!(unquote(opts), :exchange)
@worker_count Keyword.get(unquote(opts), :worker_count, 3)
Many thanks to Kip from the ex_cldr team for figuring it out.
Currently we only support :topic
in the Topology
module.
Consult https://www.cloudamqp.com/blog/2015-09-03-part4-rabbitmq-for-beginners-exchanges-routing-keys-bindings.html to cover as much as possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.