> **Experimental**
>
> `@aws-cdk/aws-msk-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# BrokerType

The broker type for the cluster.

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts#L215)

## Example

TypeScript:

```ts
declare const vpc: ec2.Vpc;

const expressCluster = new msk.Cluster(this, 'ExpressCluster', {
  clusterName: 'MyExpressCluster',
  kafkaVersion: msk.KafkaVersion.V3_8_X,
  vpc,
  brokerType: msk.BrokerType.EXPRESS,
  instanceType: ec2.InstanceType.of(
    ec2.InstanceClass.M7G,
    ec2.InstanceSize.XLARGE,
  ),
});
```

Python:

```python
# vpc: ec2.Vpc

express_cluster = msk.Cluster(self, "ExpressCluster",
    cluster_name="MyExpressCluster",
    kafka_version=msk.KafkaVersion.V3_8_X,
    vpc=vpc,
    broker_type=msk.BrokerType.EXPRESS,
    instance_type=ec2.InstanceType.of(ec2.InstanceClass.M7G, ec2.InstanceSize.XLARGE)
)
```

Java:

```java
Vpc vpc;

Cluster expressCluster = Cluster.Builder.create(this, "ExpressCluster")
        .clusterName("MyExpressCluster")
        .kafkaVersion(KafkaVersion.V3_8_X)
        .vpc(vpc)
        .brokerType(BrokerType.EXPRESS)
        .instanceType(InstanceType.of(InstanceClass.M7G, InstanceSize.XLARGE))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MSK.Alpha
Vpc vpc;

var expressCluster = new Cluster(this, "ExpressCluster", new ClusterProps {
    ClusterName = "MyExpressCluster",
    KafkaVersion = KafkaVersion.V3_8_X,
    Vpc = vpc,
    BrokerType = BrokerType.EXPRESS,
    InstanceType = InstanceType.Of(InstanceClass.M7G, InstanceSize.XLARGE)
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkmskalpha/v2
var vpc Vpc

expressCluster := msk.NewCluster(this, jsii.String("ExpressCluster"), &ClusterProps{
	ClusterName: jsii.String("MyExpressCluster"),
	KafkaVersion: msk.KafkaVersion_V3_8_X(),
	Vpc: Vpc,
	BrokerType: msk.BrokerType_EXPRESS,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_M7G, ec2.InstanceSize_XLARGE),
})
```

## Members

| Member | Description |
| --- | --- |
| `STANDARD` | Standard brokers provide high-availability guarantees. |
| `EXPRESS` | Express brokers are a low-cost option for development, testing, and workloads that don't require the high availability guarantees of standard MSK cluster. |

## Referenced by

- [`ClusterProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-msk-alpha.ClusterProps.html).brokerType
