aws-kinesis-client-0.4.0.2: A producer & consumer client library for AWS Kinesis

CopyrightCopyright © 2013-2015 PivotCloud, Inc.
LicenseApache-2.0
MaintainerJon Sterling <jsterling@alephcloud.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Aws.Kinesis.Client.Producer

Contents

Description

 

Synopsis

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

Constructors

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 (MaxMessageSize)

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).