Experimental
@aws-cdk/aws-msk-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
BrokerType Enum
The broker type for the cluster.
| Stability | Experimental |
|---|---|
| Source | lib/cluster.ts |
Example
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
# 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
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();
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)
});
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.brokerTypebroker_typebrokerTypeBrokerTypeBrokerType