Copyright | (c) Tobias Schoofs |
---|---|
License | LGPL |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
This module provides Conduit interfaces for the stomp-queue library. The interfaces create or receive streams of messages instead of single messages. This approach aims to simplify the integration of messaging into applications by means of well-defined streaming interfaces.
- qSource :: MonadResource m => Reader i -> Int -> Producer m (Message i)
- qSink :: MonadResource m => Writer o -> Type -> [Header] -> Consumer o m ()
- qMultiSource :: MonadResource m => Reader i -> Int -> Producer m (Message i)
- qMultiSink :: MonadResource m => Writer o -> Type -> [Header] -> Consumer o m ()
Plain message streams
Multipart messages as streams
qMultiSource :: MonadResource m => Reader i -> Int -> Producer m (Message i) Source
Reads from a Reader
queue with timeout
and returns a Producer
of type Message
i.
The function ends when the timeout expires
or after having received a segment that is marked as the last one.
Note that multipart messages are not foreseen by the standard.
qMultiSink
and qMultiSource
use a header named "last"
to label the last segment of a multipart message.
For parameters, please refer to qSource
.
qMultiSink :: MonadResource m => Writer o -> Type -> [Header] -> Consumer o m () Source