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-kafkaconnector.
-
-
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 StringgetAcks()Gets the acks value from the configuration.LonggetBufferMemory()Gets the buffer.memory value from the configuration.Optional<String>getKey()Gets the key value from the configuration.StringgetKeySerializer()Gets the key.serializer value from the configuration.IntegergetMaxInflightMessages()Gets the max-inflight-messages value from the configuration.IntegergetPartition()Gets the partition value from the configuration.LonggetRetries()Gets the retries value from the configuration.StringgetValueSerializer()Gets the value.serializer value from the configuration.BooleangetWaitForWriteCompletion()Gets the waitForWriteCompletion value from the configuration.voidvalidate()-
Methods inherited from class io.smallrye.reactive.messaging.kafka.KafkaConnectorCommonConfiguration
config, getBootstrapServers, getChannel, getFromAlias, getFromAliasWithDefaultValue, 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:
validatein classKafkaConnectorCommonConfiguration
-
-