Record -
kafka
: ProducerConfiguration
Represents the Kafka Producer configuration.
Fields
- bootstrapServers string
-
List of remote server endpoints of Kafka brokers
- acks ProducerAcks (default ACKS_SINGLE)
-
Number of acknowledgments
- compressionType CompressionType (default COMPRESSION_NONE)
-
Compression type to be used for messages
- clientId string
-
Identifier to be used for server side logging
- metricsRecordingLevel string
-
Metrics recording level
- metricReporterClasses string
-
Metrics reporter classes
- partitionerClass string
-
Partitioner class to be used to select the partition to which the message is sent
- interceptorClasses string
-
Interceptor classes to be used before sending records
- transactionalId string
-
Transactional ID to be used in transactional delivery
- valueSerializerType SerializerType (default SER_BYTE_ARRAY)
-
Serializer used for the Kafka record value. This can be either
kafka:SerializerType
or a user-defined serializer
- keySerializerType SerializerType (default SER_BYTE_ARRAY)
-
Serializer used for the Kafka record key. This can be either
kafka:SerializerType
or a user-defined serializer
- valueSerializer Serializer
-
Custom serializer object to serialize Kafka values. This should implement the
kafka:Serializer
object
- keySerializer Serializer
-
Custom serializer object to serialize Kafka keys. This should implement the
kafka:Serializer
object
- schemaRegistryUrl string
-
Avro schema registry URL. Use this field to specify the schema registry URL if the Avro serializer is used
- properties map<string>
-
Additional properties for the property fields not provided by Ballerina Kafka module. Use this with caution since this can override any of the fields. It is not recomendded to use this field except in an extreme situation
- bufferMemory int
-
Total bytes of memory the producer can use to buffer records
- retryCount int
-
Number of retries to resend a record
- batchSize int
-
Number of records to be batched for a single request. Use 0 for no batching
- linger int
-
Delay to allow other records to be batched
- sendBuffer int
-
Size of the TCP send buffer (SO_SNDBUF)
- receiveBuffer int
-
Size of the TCP receive buffer (SO_RCVBUF)
- maxRequestSize int
-
The maximum size of a request in bytes
- reconnectBackoffTimeInMillis int
-
Time to wait before attempting to reconnect
- reconnectBackoffMaxTimeInMillis int
-
Maximum amount of time in milliseconds to wait when reconnecting
- retryBackoffTimeInMillis int
-
Time to wait before attempting to retry a failed request
- maxBlock int
-
Maximum block time during which the sending is blocked when the buffer is full
- requestTimeoutInMillis int
-
Wait time for the response of a request
- metadataMaxAgeInMillis int
-
Maximum time to force a refresh of metadata
- metricsSampleWindowInMillis int
-
Time window for a metrics sample to compute over
- metricsNumSamples int
-
Number of samples maintained to compute the metrics
- maxInFlightRequestsPerConnection int
-
Maximum number of unacknowledged requests on a single connection
- connectionsMaxIdleTimeInMillis int
-
Close the idle connections after this number of milliseconds
- transactionTimeoutInMillis int
-
Timeout for transaction status update from the producer
- enableIdempotence boolean (default false)
-
Exactly one copy of each message is written to the stream when enabled
- secureSocket SecureSocket
-
Configurations related to SSL/TLS encryption
- authenticationConfiguration AuthenticationConfiguration
-
Authentication-related configurations for the Kafka producer