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

Contents

Description

 

Synopsis

Documentation

data ProducerKit Source

The basic input required to construct a Kinesis producer.

Constructors

ProducerKit 

Fields

_pkKinesisKit :: !KinesisKit

The basic information required to send requests to AWS Kinesis.

_pkStreamName :: !StreamName

The name of the stream to send records to.

_pkBatchPolicy :: !BatchPolicy

The record batching policy for the producer.

_pkRetryPolicy :: !RetryPolicy

The retry policy for the producer.

_pkMessageQueueBounds :: !Natural

The maximum number of records that may be enqueued at one time.

_pkMaxConcurrency :: !Natural

The number of requests to run concurrently (minimum: 1).

_pkCleanupTimeout :: !(Maybe Natural)

The timeout in microseconds, after which the producer's cleanup routine will terminate, finished or not, throwing ProducerCleanupTimedOut.

_pkQueueImplementation :: QueueImplementation

The Kinesis Producer is parameterized over a concrete queue implementation.

makeProducerKit :: KinesisKit -> StreamName -> ProducerKit Source

Create a ProducerKit with default settings.

Queue Implementations

data QueueImplementation Source

A proxy object for specifying a concrete queue implementation. You may provide your own, or use defaultQueueImplementation.

Constructors

forall proxy q . BoundedCloseableQueue q MessageQueueItem => QueueImplementation (proxy q) 

Policies

data BatchPolicy Source

The producer batches records according to a user-specified policy.

defaultBatchPolicy :: BatchPolicy Source

The default batching policy sends 200 records per PutRecordsEndpoint request.

bpBatchSize :: Lens' BatchPolicy Natural Source

The number of records to send in a single request. This is only used when the endpoint is set to PutRecordsEndpoint.

data RetryPolicy Source

The producer will attempt to re-send records which failed according to a user-specified policy. This policy applies to failures which occur in the process of sending a message to Kinesis, not those which occur in the course of enqueuing a message.

defaultRetryPolicy :: RetryPolicy Source

The default retry policy will attempt 5 retries for a message.

rpRetryCount :: Lens' RetryPolicy Natural Source

The number of times to retry sending a message after it has first failed.

Other Types

data MessageQueueItem Source

Constructors

MessageQueueItem 

Fields

_mqiMessage :: !Message

The contents of the message

_mqiPartitionKey :: !PartitionKey

The partition key the message is destined for

_mqiRemainingAttempts :: !Natural

The number of times remaining to try and publish this message