amqp-worker-2.0.0: Type-safe AMQP workers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.AMQP.Worker.Connection

Synopsis

Documentation

connect :: MonadIO m => ConnectionOpts -> m Connection Source #

Connect to the AMQP server using simple defaults

conn <- connect (fromURI "amqp://guest:guest@localhost:5672")

withChannel :: Connection -> (Channel -> IO b) -> IO b Source #

Perform an action with a channel resource, and give it back at the end

data WorkerOpts Source #

Constructors

WorkerOpts 

Fields

Instances

Instances details
Show WorkerOpts Source # 
Instance details

Defined in Network.AMQP.Worker.Connection

Eq WorkerOpts Source # 
Instance details

Defined in Network.AMQP.Worker.Connection

data ConnectionOpts #

Represents the parameters to connect to a broker or a cluster of brokers. See defaultConnectionOpts.

Constructors

ConnectionOpts 

Fields

defaultConnectionOpts :: ConnectionOpts #

Constructs default connection options with the following settings :

  • Broker: amqp://guest:guest@localhost:5672/%2F using the PLAIN SASL mechanism
  • max frame size: 131072
  • use the heartbeat delay suggested by the broker
  • no limit on the number of used channels

fromURI :: String -> ConnectionOpts #

Parses amqp standard URI of the form amqp://user:passwordhost:port/vhost and returns a ConnectionOpts for use with openConnection'' | Any of these fields may be empty and will be replaced with defaults from amqp:/guest:guest@localhost:5672@