Copyright | Copyright © 2013-2015 PivotCloud, Inc. |
---|---|
License | Apache-2.0 |
Maintainer | Jon Sterling <jsterling@alephcloud.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- data KinesisProducer
- withKinesisProducer :: (MonadIO m, MonadBaseControl IO m) => ProducerKit -> (KinesisProducer -> m α) -> m α
- managedKinesisProducer :: (MonadIO m, MonadBaseControl IO m) => ProducerKit -> Codensity m KinesisProducer
- writeProducer :: MonadIO m => KinesisProducer -> Message -> m (Either WriteProducerException ())
- type Message = Text
- module Aws.Kinesis.Client.Producer.Kit
- data WriteProducerException
- data ProducerCleanupTimedOut = ProducerCleanupTimedOut
- data ProducerWorkerDied = ProducerWorkerDied (Maybe SomeException)
The Producer
data KinesisProducer Source
The (abstract) Kinesis producer client.
withKinesisProducer :: (MonadIO m, MonadBaseControl IO m) => ProducerKit -> (KinesisProducer -> m α) -> m α Source
This constructs a KinesisProducer
and closes it when you have done with
it.
managedKinesisProducer :: (MonadIO m, MonadBaseControl IO m) => ProducerKit -> Codensity m KinesisProducer Source
This constructs a KinesisProducer
and closes it when you have done with
it. This is equivalent to withKinesisProducer
, but replaces the
continuation with a return in Codensity
.
Commands
writeProducer :: MonadIO m => KinesisProducer -> Message -> m (Either WriteProducerException ()) Source
Enqueues a message to Kinesis on the next shard. If a message cannot be
enqueued, an error of type WriteProducerException
will be returned.
Exceptions
data WriteProducerException Source
ProducerQueueClosed | Thrown when a message could not be enqueued since the queue was closed. |
ProducerQueueFull | Thrown when a message could not be enqueued since the queue was full. |
MessageTooLarge | Thrown when the message was larger than the maximum message size
( |
data ProducerCleanupTimedOut Source
Thrown when the producer's cleanup routine takes longer than the configured timeout.
data ProducerWorkerDied Source
Thrown when the producer's worker dies unexpectedly (this is fatal, and should never happen).