-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | a message queue using MongoDB -- -- a message queue using MongoDB @package mongodb-queue @version 0.2.5.3 module Database.MongoDB.Queue -- | emit a message for a worker emit :: QueueEmitter -> Document -> IO () -- | Get the next message from the queue. First marks the message as -- handled. -- -- Do not call this from multiple threads against the same QueueWorker nextFromQueue :: QueueWorker -> IO Document -- | create a QueueEmitter createEmitter :: DBRunner -> IO QueueEmitter -- | create an emitter with non-default configuration mkEmitter :: EmitterOpts -> DBRunner -> IO QueueEmitter data EmitterOpts EmitterOpts :: Int -> Collection -> Int -> EmitterOpts emitterVersion :: EmitterOpts -> Int emitterCollection :: EmitterOpts -> Collection emitterMaxByteSize :: EmitterOpts -> Int -- | creates a QueueWorker create a single QueueWorker per process (per -- queue collection) call nextFromQueue with the QueueWorker to get the -- next message -- -- QueueWorker is probably poorly named now with the direction the -- library has taken. To handle multiple messages at once use the setup -- mentioned above with just 1 QueueWorker. But immediately hand off -- messages from nextFromQueue to worker threads (this library does not -- help you create worker threads) createWorker :: DBRunner -> IO QueueWorker -- | create an worker with non-default configuration mkWorker :: WorkerOpts -> DBRunner -> IO QueueWorker data WorkerOpts WorkerOpts :: Int -> Collection -> WorkerOpts workerMaxByteSize :: WorkerOpts -> Int workerCollection :: WorkerOpts -> Collection instance Typeable MongoQueueException instance Show MongoQueueException instance Exception MongoQueueException instance Default WorkerOpts instance Default EmitterOpts