amqp-streamly-0.2.0: A simple streamly wrapper for amqp

Safe HaskellNone
LanguageHaskell2010

Network.AMQP.Streamly

Contents

Synopsis

How to use this library

This section contains basic step-by-step usage of the library.

You can either build a producer, which will publish all the messages of a stream:

Streamly.drain $ produce channel sendInstructionsStream

Or a consumer, which will contain the Messages and Envelopes of a queue:

Streamly.drain $ consume channel aQueue NoAck

data SendInstructions Source #

Informations to be sent

See Network.AMQP.publishMsg' for options

produce :: (IsStream t, MonadAsync m) => Channel -> t m SendInstructions -> t m () Source #

Publish the produced messages

consume :: (IsStream t, MonadAsync m) => Channel -> Queue -> Ack -> t m (Message, Envelope) Source #

Stream messages from a queue

See Network.AMQP.consumeMsgs for options