viebel / duct-rabbitmq

Integrant methods for connecting to a RabbitMQ server via langohr
Eclipse Public License 1.0
3 stars 2 forks source link

Integrant Keys for Channels #1

Open bdrillard opened 3 years ago

bdrillard commented 3 years ago

Integrant keys are defined for a Langohr Connection, and the keys for Produces/Consumers create efficient Channels efficiently.

Simpler apps, e.g. that make use only of the "Pull API", would need Channels to be available for the lifecycle of the app.

Would you accept a PR that adds :duct.amqp.rabbitmq.langohr/channel keys? I'm thinking it could be defined to take a config map of either an existing Connection object, or the same config map as a Connection, depending on how many Connections a user anticipates they'll need in their app (many or one), i.e.

;; Create new Channel against existing Connection, halt closes the Channel
:duct.amqp.rabbitmq.langohr/channel 
{:connection conn}

or

;; Create new Channel against new Connection, halt closes Channel and Connection
:duct.amqp.rabbitmq.langohr/channel 
{:host "localhost"
 :port 5672
 :username "guest"
 :password "guest"
 :vhost "/"}
viebel commented 3 years ago

Sure. Please open a PR. Sorry for the delay!