Class ApacheKafkaCommitterConfig
java.lang.Object
com.norconex.committer.core.BaseCommitterConfig
com.norconex.committer.core.batch.BaseBatchCommitterConfig
com.norconex.committer.apachekafka.ApacheKafkaCommitterConfig
Configuration for ApacheKafkaCommitter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumKafka SASL sign-in mechanisms using a user name and password.static enumKafka client security protocols. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe Apache Kafka broker list, comma-separated (e.g., host1:port1,host2:port2,...).The user name and password to sign in with when using SASL.intThe number of partitions for the new topic.shortGets the replication factor for the new topic.How the client signs in whengetSecurityProtocol()isApacheKafkaCommitterConfig.SecurityProtocol.SASL_PLAINTEXTorApacheKafkaCommitterConfig.SecurityProtocol.SASL_SSL.How the Kafka client connects to the brokers: whether the connection is encrypted (TLS) and whether the client signs in (SASL).The topic name to which documents will be sentinthashCode()booleanWhether to create the topic in Apache Kafka.setBootstrapServers(String bootstrapServers) The Apache Kafka broker list, comma-separated (e.g., host1:port1,host2:port2,...).setCreateTopic(boolean createTopic) Whether to create the topic in Apache Kafka.setCredentials(Credentials credentials) setPartitions(int partitions) The number of partitions for the new topic.setReplicationFactor(short replicationFactor) Gets the replication factor for the new topic.setSaslMechanism(ApacheKafkaCommitterConfig.SaslMechanism saslMechanism) How the client signs in whengetSecurityProtocol()isApacheKafkaCommitterConfig.SecurityProtocol.SASL_PLAINTEXTorApacheKafkaCommitterConfig.SecurityProtocol.SASL_SSL.setSecurityProtocol(ApacheKafkaCommitterConfig.SecurityProtocol securityProtocol) How the Kafka client connects to the brokers: whether the connection is encrypted (TLS) and whether the client signs in (SASL).setTopicName(String topicName) The topic name to which documents will be senttoString()Methods inherited from class com.norconex.committer.core.batch.BaseBatchCommitterConfig
getQueue, setQueueMethods inherited from class com.norconex.committer.core.BaseCommitterConfig
addRestriction, addRestrictions, clearFieldMappings, clearRestrictions, getAcl, getFieldMappings, getRestrictions, removeFieldMapping, removeRestriction, removeRestriction, setAcl, setFieldMapping, setFieldMappings
-
Constructor Details
-
ApacheKafkaCommitterConfig
public ApacheKafkaCommitterConfig()
-
-
Method Details
-
setCredentials
-
getTopicName
The topic name to which documents will be sent -
getBootstrapServers
The Apache Kafka broker list, comma-separated (e.g., host1:port1,host2:port2,...). -
isCreateTopic
public boolean isCreateTopic()Whether to create the topic in Apache Kafka. It will be created only if it is not already present. -
getPartitions
public int getPartitions()The number of partitions for the new topic. Required ifisCreateTopic()istrue -
getReplicationFactor
public short getReplicationFactor()Gets the replication factor for the new topic. Required ifisCreateTopic()istrue -
getSecurityProtocol
How the Kafka client connects to the brokers: whether the connection is encrypted (TLS) and whether the client signs in (SASL). When not set, the Kafka default (ApacheKafkaCommitterConfig.SecurityProtocol.PLAINTEXT) applies. -
getSaslMechanism
How the client signs in whengetSecurityProtocol()isApacheKafkaCommitterConfig.SecurityProtocol.SASL_PLAINTEXTorApacheKafkaCommitterConfig.SecurityProtocol.SASL_SSL. Defaults toApacheKafkaCommitterConfig.SaslMechanism.PLAINwhen those are used and nothing is set. -
getCredentials
The user name and password to sign in with when using SASL. The password can be encrypted, so it stays out of the configuration. -
setTopicName
The topic name to which documents will be sent- Returns:
this.
-
setBootstrapServers
The Apache Kafka broker list, comma-separated (e.g., host1:port1,host2:port2,...).- Returns:
this.
-
setCreateTopic
Whether to create the topic in Apache Kafka. It will be created only if it is not already present.- Returns:
this.
-
setPartitions
The number of partitions for the new topic. Required ifisCreateTopic()istrue- Returns:
this.
-
setReplicationFactor
Gets the replication factor for the new topic. Required ifisCreateTopic()istrue- Returns:
this.
-
setSecurityProtocol
public ApacheKafkaCommitterConfig setSecurityProtocol(ApacheKafkaCommitterConfig.SecurityProtocol securityProtocol) How the Kafka client connects to the brokers: whether the connection is encrypted (TLS) and whether the client signs in (SASL). When not set, the Kafka default (ApacheKafkaCommitterConfig.SecurityProtocol.PLAINTEXT) applies.- Returns:
this.
-
setSaslMechanism
public ApacheKafkaCommitterConfig setSaslMechanism(ApacheKafkaCommitterConfig.SaslMechanism saslMechanism) How the client signs in whengetSecurityProtocol()isApacheKafkaCommitterConfig.SecurityProtocol.SASL_PLAINTEXTorApacheKafkaCommitterConfig.SecurityProtocol.SASL_SSL. Defaults toApacheKafkaCommitterConfig.SaslMechanism.PLAINwhen those are used and nothing is set.- Returns:
this.
-
equals
- Overrides:
equalsin classBaseBatchCommitterConfig
-
canEqual
- Overrides:
canEqualin classBaseBatchCommitterConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseBatchCommitterConfig
-
toString
- Overrides:
toStringin classBaseBatchCommitterConfig
-