> **Experimental**
>
> `@aws-cdk/aws-pipes-sources-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# StreamSourceParameters

Base parameters for streaming sources.

Extends: StreamSourceParameters
Used as props by: StreamSource

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/streamSource.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0-alpha.0/packages/@aws-cdk/aws-pipes-sources-alpha/lib/streamSource.ts#L11)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as pipes_sources_alpha from '@aws-cdk/aws-pipes-sources-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_sqs as sqs } from 'aws-cdk-lib';

declare const queue: sqs.Queue;
const streamSourceParameters: pipes_sources_alpha.StreamSourceParameters = {
  batchSize: 123,
  deadLetterTarget: queue,
  maximumBatchingWindow: cdk.Duration.minutes(30),
  maximumRecordAge: cdk.Duration.minutes(30),
  maximumRetryAttempts: 123,
  onPartialBatchItemFailure: pipes_sources_alpha.OnPartialBatchItemFailure.AUTOMATIC_BISECT,
  parallelizationFactor: 123,
};
```

## Properties

- `batchSize`: number = 1 — The maximum number of records to include in each batch.

- `deadLetterTarget`: [IQueue](/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.IQueue.html) | [ITopic](/cdk/api/v2/docs/aws-cdk-lib.aws_sns.ITopic.html) — Define the target to send dead-letter queue events to.

  **Default:** no dead-letter queue or topic

  The dead-letter queue stores any events that are not successfully delivered to a Pipes target after all retry attempts are exhausted.
  You can then resolve the issue that caused the failed invocations and replay the events at a later time.
  In some cases, such as when access is denied to a resource, events are sent directly to the dead-letter queue and are not retried.

- `maximumBatchingWindow`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The maximum length of a time to wait for events.

  **Default:** the events will be handled immediately

- `maximumRecordAge`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — Discard records older than the specified age.

  **Default:** -1 - EventBridge won't discard old records

  The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, EventBridge never discards old records.

- `maximumRetryAttempts`: number — Discard records after the specified number of retries.

  **Default:** -1 - EventBridge will retry failed records until the record expires in the event source

  The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, EventBridge retries failed records until the record expires in the event source.

- `onPartialBatchItemFailure`: [OnPartialBatchItemFailure](/cdk/api/v2/docs/@aws-cdk_aws-pipes-sources-alpha.OnPartialBatchItemFailure.html) — Define how to handle item process failures.

  **Default:** off - EventBridge will retry the entire batch

  {@link OnPartialBatchItemFailure.AUTOMATIC_BISECT} halves each batch and will retry each half until all the records are processed or there is one failed message left in the batch.

- `parallelizationFactor`: number = 1 — The number of batches to process concurrently from each shard.
