itk_queue v0.6.2 ITKQueue.ConnectionPool

Manages a pool of connections to AMQP.

When a connection is needed call with_connection/1 and pass it the function that needs the connection. The function will be executed with a connection checked out from the pool. After the function completes the connection will be checked back into the pool.

Summary

Functions

Provides a way to obtain a connection from the pool

Functions

with_connection(action)

Provides a way to obtain a connection from the pool.

Example: ITKQueue.ConnectionPool.with_connection(fn(connection) ->

# ... do something with the connection

end)