jlouis / turtle

A wrapper on the RabbitMQ Erlang Client (Erlang)
Other
71 stars 15 forks source link

turtle_service:validate_config/1 does not catch when the connection name does not exist #39

Closed ptrf closed 6 years ago

ptrf commented 6 years ago

For example: Imagine we have a connection named amqp_server, and we start an RPC service using

turtle_service:start_link(#{ name => rpc_service, connection => amqpserver, [...] })

Then turtle proceeds happily to create rpc_service, although it has no connectivity.

Proposed solution: In validate_config/1, check the application environment to see if the named connection has been defined - if not, we should crash

ptrf commented 6 years ago

@jlouis Unless you have any objections, I'll go ahead and submit a PR that fixes this issue.

ptrf commented 6 years ago

Fixed in #40