- Add asynchronous message publishing.
- Fix missing specification for
ConsumerServer
unique id
- Prefix modules with
Coney.
to avoid conflicts
- Fix missing
:name
when startingConsumerServer
- Add
:enabled
config value :adapter
config value is now optional and defaults toConey.RabbitConnection
- Fix incorrect termination order where the connection to RabbitMQ was closed before the channels.
- Implemented monitoring for spawned messages to improve tracebility.
- Updated dependencies (
amqp
) #16
- Introduce RabbitMQ
topology
configuration and setup. Coney now starts up in two phases, first it sets up the topology (queues/exchanges) and then starts consuming from the queues. This allows more complex RabbitMQ setups like retry queues, etc. - Remove pooling for clusters as this should be handled on cluster side instead.
- New option
consumer_tag
for workerconnection
settings.
auto_start
option allow you choose how you want to start Coney. Usefalse
value if you want to addConey.ApplicationSupervisor
to your supervisor.true
(default value) means that Coney will run on application start.- Settings module. You can speficfy a module name under
coney.settings
section and definesettings/0
function, which should return connection configuration.
- Fixed bug when connection server's pid remained in the list of connections after death
- New Coney module with
publish/2
,publish/3
,status/0
methods
- Fixed bug with logging of consumer start if worker is defined with map
- Error logs for connection errors
- Error log for unhandled exceptions if
error_handler
is missing - Debug log after connection was established
- Debug log after consumer was started
error_happened/4
callback added
- Added
:default
option forconnection.exchange
- Channel per each publish message.
- Change value of
respond_to
field in connection specification to string with exchange name - No need to add Coney to your application supervisor tree
- Consumers should be described in
worker
config parameter
amqp
updated to version 1.0poison
removed from dependencies- Added
Coney.Consumer
behaviour - Added option
pool_size
- number of RabbitMQ connections.
- Changed format of consumer
process/2
anderror_happened/3
functions error_happened/3
marked as optionalConey.AMQPConnection
removed from configs- Logging removed
-
Allow to define several RabbitMQ hosts for connection (will be used random host from list)
# config/config.exs config :coney, Coney.AMQPConnection, [ settings: %{ url: ["amqp://guest:guest@localhost", "amqp://guest:guest@other_host"] } ]
-
{:reject, reason}
return value: Reject message without redelivery.defmodule MyConsumer do def connection do #... end def parse(payload) do String.to_integer(payload) end def process(number) do if number <= 10 do {:ok, "Work done"} else {:reject, "Number should be less than 10"} end end end
- Fix warnings about undefined behaviour function publish/2, publish/3