Class EmbeddedDebeziumConfiguration
- java.lang.Object
-
- org.apache.camel.component.debezium.configuration.EmbeddedDebeziumConfiguration
-
@UriParams public abstract class EmbeddedDebeziumConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description EmbeddedDebeziumConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static <T> void
addPropertyIfNotNull(io.debezium.config.Configuration.Builder configBuilder, io.debezium.config.Field field, T value)
protected static <T> void
addPropertyIfNotNull(io.debezium.config.Configuration.Builder configBuilder, String key, T value)
protected abstract Class<?>
configureConnectorClass()
Configure the Debezium connector class that is supported by Debeziumprotected abstract io.debezium.config.Configuration
createConnectorConfiguration()
Create a specificConfiguration
for a concrete configurationio.debezium.config.Configuration
createDebeziumConfiguration()
Creates a Debezium configuration of typeConfiguration
in order to be used in the engine.Map<String,Object>
getAdditionalProperties()
Class<?>
getConnectorClass()
The name of the Java class for the connectorabstract String
getConnectorDatabaseType()
The Debezium connector type that is supported by Camel Debezium component.String
getInternalKeyConverter()
The Converter class that should be used to serialize and deserialize key data for offsets.String
getInternalValueConverter()
The Converter class that should be used to serialize and deserialize value data for offsets.String
getName()
Unique name for the connector.String
getOffsetCommitPolicy()
The name of the Java class of the commit policy.long
getOffsetCommitTimeoutMs()
Maximum number of milliseconds to wait for records to flush and partition offset data to be committed to offset storage before cancelling the process and restoring the offset data to be committed in a future attempt.long
getOffsetFlushIntervalMs()
Interval at which to try committing offsets.String
getOffsetStorage()
The name of the Java class that is responsible for persistence of connector offsets.String
getOffsetStorageFileName()
Path to file where offsets are to be stored.int
getOffsetStoragePartitions()
The number of partitions used when creating the offset storage topic.int
getOffsetStorageReplicationFactor()
Replication factor used when creating the offset storage topic.String
getOffsetStorageTopic()
The name of the Kafka topic where offsets are to be stored.protected static boolean
isFieldValueNotSet(Object field)
void
setAdditionalProperties(Map<String,Object> additionalProperties)
Sets additional properties for debezium components in case they can't be set directly on the camel configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example setting KafkaOffsetBackingStore), the properties have to be prefixed with `additionalProperties.`.void
setConnectorClass(Class<?> connectorClass)
void
setInternalKeyConverter(String internalKeyConverter)
void
setInternalValueConverter(String internalValueConverter)
void
setName(String name)
void
setOffsetCommitPolicy(String offsetCommitPolicy)
void
setOffsetCommitTimeoutMs(long offsetCommitTimeoutMs)
void
setOffsetFlushIntervalMs(long offsetFlushIntervalMs)
void
setOffsetStorage(String offsetStorage)
void
setOffsetStorageFileName(String offsetStorageFileName)
void
setOffsetStoragePartitions(int offsetStoragePartitions)
void
setOffsetStorageReplicationFactor(int offsetStorageReplicationFactor)
void
setOffsetStorageTopic(String offsetStorageTopic)
ConfigurationValidation
validateConfiguration()
Validate all configurations defined and returnConfigurationValidation
instance which contains the validation resultsprotected abstract ConfigurationValidation
validateConnectorConfiguration()
Validate a concrete configuration
-
-
-
Method Detail
-
configureConnectorClass
protected abstract Class<?> configureConnectorClass()
Configure the Debezium connector class that is supported by Debezium- Returns:
Class
-
createConnectorConfiguration
protected abstract io.debezium.config.Configuration createConnectorConfiguration()
Create a specificConfiguration
for a concrete configuration- Returns:
Configuration
-
validateConnectorConfiguration
protected abstract ConfigurationValidation validateConnectorConfiguration()
Validate a concrete configuration- Returns:
ConfigurationValidation
-
getConnectorDatabaseType
public abstract String getConnectorDatabaseType()
The Debezium connector type that is supported by Camel Debezium component.- Returns:
String
-
createDebeziumConfiguration
public io.debezium.config.Configuration createDebeziumConfiguration()
Creates a Debezium configuration of typeConfiguration
in order to be used in the engine.- Returns:
Configuration
-
addPropertyIfNotNull
protected static <T> void addPropertyIfNotNull(io.debezium.config.Configuration.Builder configBuilder, io.debezium.config.Field field, T value)
-
addPropertyIfNotNull
protected static <T> void addPropertyIfNotNull(io.debezium.config.Configuration.Builder configBuilder, String key, T value)
-
validateConfiguration
public ConfigurationValidation validateConfiguration()
Validate all configurations defined and returnConfigurationValidation
instance which contains the validation results- Returns:
ConfigurationValidation
-
isFieldValueNotSet
protected static boolean isFieldValueNotSet(Object field)
-
getConnectorClass
public Class<?> getConnectorClass()
The name of the Java class for the connector
-
setConnectorClass
public void setConnectorClass(Class<?> connectorClass)
-
getName
public String getName()
Unique name for the connector. Attempting to register again with the same name will fail.
-
setName
public void setName(String name)
-
getOffsetStorage
public String getOffsetStorage()
The name of the Java class that is responsible for persistence of connector offsets.
-
setOffsetStorage
public void setOffsetStorage(String offsetStorage)
-
getOffsetStorageFileName
public String getOffsetStorageFileName()
Path to file where offsets are to be stored. Required when offset.storage is set to the FileOffsetBackingStore
-
setOffsetStorageFileName
public void setOffsetStorageFileName(String offsetStorageFileName)
-
getOffsetStorageTopic
public String getOffsetStorageTopic()
The name of the Kafka topic where offsets are to be stored. Required when offset.storage is set to the KafkaOffsetBackingStore.
-
setOffsetStorageTopic
public void setOffsetStorageTopic(String offsetStorageTopic)
-
getOffsetStorageReplicationFactor
public int getOffsetStorageReplicationFactor()
Replication factor used when creating the offset storage topic. Required when offset.storage is set to the KafkaOffsetBackingStore
-
setOffsetStorageReplicationFactor
public void setOffsetStorageReplicationFactor(int offsetStorageReplicationFactor)
-
getOffsetCommitPolicy
public String getOffsetCommitPolicy()
The name of the Java class of the commit policy. It defines when offsets commit has to be triggered based on the number of events processed and the time elapsed since the last commit. This class must implement the interface 'OffsetCommitPolicy'. The default is a periodic commit policy based upon time intervals.
-
setOffsetCommitPolicy
public void setOffsetCommitPolicy(String offsetCommitPolicy)
-
getOffsetFlushIntervalMs
public long getOffsetFlushIntervalMs()
Interval at which to try committing offsets. The default is 1 minute.
-
setOffsetFlushIntervalMs
public void setOffsetFlushIntervalMs(long offsetFlushIntervalMs)
-
getOffsetCommitTimeoutMs
public long getOffsetCommitTimeoutMs()
Maximum number of milliseconds to wait for records to flush and partition offset data to be committed to offset storage before cancelling the process and restoring the offset data to be committed in a future attempt. The default is 5 seconds.
-
setOffsetCommitTimeoutMs
public void setOffsetCommitTimeoutMs(long offsetCommitTimeoutMs)
-
getOffsetStoragePartitions
public int getOffsetStoragePartitions()
The number of partitions used when creating the offset storage topic. Required when offset.storage is set to the 'KafkaOffsetBackingStore'.
-
setOffsetStoragePartitions
public void setOffsetStoragePartitions(int offsetStoragePartitions)
-
getInternalKeyConverter
public String getInternalKeyConverter()
The Converter class that should be used to serialize and deserialize key data for offsets. The default is JSON converter.
-
setInternalKeyConverter
public void setInternalKeyConverter(String internalKeyConverter)
-
getInternalValueConverter
public String getInternalValueConverter()
The Converter class that should be used to serialize and deserialize value data for offsets. The default is JSON converter.
-
setInternalValueConverter
public void setInternalValueConverter(String internalValueConverter)
-
setAdditionalProperties
public void setAdditionalProperties(Map<String,Object> additionalProperties)
Sets additional properties for debezium components in case they can't be set directly on the camel configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example setting KafkaOffsetBackingStore), the properties have to be prefixed with `additionalProperties.`. E.g: `additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro`
-
-