Class KafkaConnectorOutgoingConfiguration
- java.lang.Object
-
- io.smallrye.reactive.messaging.kafka.KafkaConnectorCommonConfiguration
-
- io.smallrye.reactive.messaging.kafka.KafkaConnectorOutgoingConfiguration
-
public class KafkaConnectorOutgoingConfiguration extends KafkaConnectorCommonConfiguration
Extract the outgoing configuration for thesmallrye-kafka
connector.
-
-
Field Summary
-
Fields inherited from class io.smallrye.reactive.messaging.kafka.KafkaConnectorCommonConfiguration
config
-
-
Constructor Summary
Constructors Constructor Description KafkaConnectorOutgoingConfiguration(org.eclipse.microprofile.config.Config config)
Creates a new KafkaConnectorOutgoingConfiguration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAcks()
Gets the acks value from the configuration.Long
getBufferMemory()
Gets the buffer.memory value from the configuration.Optional<String>
getKey()
Gets the key value from the configuration.String
getKeySerializer()
Gets the key.serializer value from the configuration.Integer
getMaxInflightMessages()
Gets the max-inflight-messages value from the configuration.Integer
getPartition()
Gets the partition value from the configuration.Long
getRetries()
Gets the retries value from the configuration.String
getValueSerializer()
Gets the value.serializer value from the configuration.Boolean
getWaitForWriteCompletion()
Gets the waitForWriteCompletion value from the configuration.void
validate()
-
Methods inherited from class io.smallrye.reactive.messaging.kafka.KafkaConnectorCommonConfiguration
config, getBootstrapServers, getChannel, getFromAlias, getFromAliasWithDefaultValue, getHealthEnabled, getTopic
-
-
-
-
Method Detail
-
getKeySerializer
public String getKeySerializer()
Gets the key.serializer value from the configuration. Attribute Name: key.serializer Description: The serializer classname used to serialize the record's key Default Value: org.apache.kafka.common.serialization.StringSerializer- Returns:
- the key.serializer
-
getValueSerializer
public String getValueSerializer()
Gets the value.serializer value from the configuration. Attribute Name: value.serializer Description: The serializer classname used to serialize the payload Mandatory: yes- Returns:
- the value.serializer
-
getAcks
public String getAcks()
Gets the acks value from the configuration. Attribute Name: acks Description: The number of acknowledgments the producer requires the leader to have received before considering a request complete. This controls the durability of records that are sent. Accepted values are: 0, 1, all Default Value: 1- Returns:
- the acks
-
getBufferMemory
public Long getBufferMemory()
Gets the buffer.memory value from the configuration. Attribute Name: buffer.memory Description: The total bytes of memory the producer can use to buffer records waiting to be sent to the server. Default Value: 33554432- Returns:
- the buffer.memory
-
getRetries
public Long getRetries()
Gets the retries value from the configuration. Attribute Name: retries Description: Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error. Default Value: 2147483647- Returns:
- the retries
-
getKey
public Optional<String> getKey()
Gets the key value from the configuration. Attribute Name: key Description: A key to used when writing the record- Returns:
- the key
-
getPartition
public Integer getPartition()
Gets the partition value from the configuration. Attribute Name: partition Description: The target partition id. -1 to let the client determine the partition Default Value: -1- Returns:
- the partition
-
getWaitForWriteCompletion
public Boolean getWaitForWriteCompletion()
Gets the waitForWriteCompletion value from the configuration. Attribute Name: waitForWriteCompletion Description: Whether the client waits for Kafka to acknowledge the written record before acknowledging the message Default Value: true- Returns:
- the waitForWriteCompletion
-
getMaxInflightMessages
public Integer getMaxInflightMessages()
Gets the max-inflight-messages value from the configuration. Attribute Name: max-inflight-messages Description: The maximum number of messages to be written to Kafka concurrently - The default value is the value from the `max.in.flight.requests.per.connection` Kafka property. It configures the maximum number of unacknowledged requests the client before blocking. Note that if this setting is set to be greater than 1 and there are failed sends, there is a risk of message re-ordering due to retries. Default Value: 5- Returns:
- the max-inflight-messages
-
validate
public void validate()
- Overrides:
validate
in classKafkaConnectorCommonConfiguration
-
-