Package io.debezium.server.eventhubs
Class EventHubsChangeConsumer
- java.lang.Object
-
- io.debezium.server.BaseChangeConsumer
-
- io.debezium.server.eventhubs.EventHubsChangeConsumer
-
- All Implemented Interfaces:
DebeziumEngine.ChangeConsumer<ChangeEvent<Object,Object>>
@Named("eventhubs") @Dependent public class EventHubsChangeConsumer extends BaseChangeConsumer implements DebeziumEngine.ChangeConsumer<ChangeEvent<Object,Object>>This sink adapter delivers change event messages to Azure Event Hubs- Author:
- Abhishek Gupta
-
-
Field Summary
Fields Modifier and Type Field Description private static StringCONNECTION_STRING_FORMATprivate StringconnectionString(package private) javax.enterprise.inject.Instance<com.azure.messaging.eventhubs.EventHubProducerClient>customProducerprivate StringeventHubNameprivate static org.slf4j.LoggerLOGGERprivate IntegermaxBatchSizeprivate StringpartitionIDprivate StringpartitionKeyprivate com.azure.messaging.eventhubs.EventHubProducerClientproducerprivate static StringPROP_CONNECTION_STRING_NAMEprivate static StringPROP_EVENTHUB_NAMEprivate static StringPROP_MAX_BATCH_SIZEprivate static StringPROP_PARTITION_IDprivate static StringPROP_PARTITION_KEYprivate static StringPROP_PREFIX-
Fields inherited from class io.debezium.server.BaseChangeConsumer
streamNameMapper
-
-
Constructor Summary
Constructors Constructor Description EventHubsChangeConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidclose()(package private) voidconnect()voidhandleBatch(List<ChangeEvent<Object,Object>> records, DebeziumEngine.RecordCommitter<ChangeEvent<Object,Object>> committer)-
Methods inherited from class io.debezium.server.BaseChangeConsumer
getBytes, getConfigSubset, getString, unsupportedTypeMessage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.engine.DebeziumEngine.ChangeConsumer
supportsTombstoneEvents
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
PROP_PREFIX
private static final String PROP_PREFIX
- See Also:
- Constant Field Values
-
PROP_CONNECTION_STRING_NAME
private static final String PROP_CONNECTION_STRING_NAME
- See Also:
- Constant Field Values
-
PROP_EVENTHUB_NAME
private static final String PROP_EVENTHUB_NAME
- See Also:
- Constant Field Values
-
PROP_PARTITION_ID
private static final String PROP_PARTITION_ID
- See Also:
- Constant Field Values
-
PROP_PARTITION_KEY
private static final String PROP_PARTITION_KEY
- See Also:
- Constant Field Values
-
PROP_MAX_BATCH_SIZE
private static final String PROP_MAX_BATCH_SIZE
- See Also:
- Constant Field Values
-
connectionString
private String connectionString
-
eventHubName
private String eventHubName
-
partitionID
private String partitionID
-
partitionKey
private String partitionKey
-
maxBatchSize
private Integer maxBatchSize
-
CONNECTION_STRING_FORMAT
private static final String CONNECTION_STRING_FORMAT
- See Also:
- Constant Field Values
-
producer
private com.azure.messaging.eventhubs.EventHubProducerClient producer
-
customProducer
@Inject @CustomConsumerBuilder javax.enterprise.inject.Instance<com.azure.messaging.eventhubs.EventHubProducerClient> customProducer
-
-
Method Detail
-
connect
@PostConstruct void connect()
-
close
@PreDestroy void close()
-
handleBatch
public void handleBatch(List<ChangeEvent<Object,Object>> records, DebeziumEngine.RecordCommitter<ChangeEvent<Object,Object>> committer) throws InterruptedException
- Specified by:
handleBatchin interfaceDebeziumEngine.ChangeConsumer<ChangeEvent<Object,Object>>- Throws:
InterruptedException
-
-