Package io.debezium.server.http
Class HttpChangeConsumer
- java.lang.Object
-
- io.debezium.server.BaseChangeConsumer
-
- io.debezium.server.http.HttpChangeConsumer
-
- All Implemented Interfaces:
DebeziumEngine.ChangeConsumer<ChangeEvent<Object,Object>>
@Named("http") @Dependent public class HttpChangeConsumer extends BaseChangeConsumer implements DebeziumEngine.ChangeConsumer<ChangeEvent<Object,Object>>Implementation of the consumer that delivers the messages to an HTTP Webhook destination.- Author:
- Chris Baumbauer
-
-
Field Summary
Fields Modifier and Type Field Description private HttpClientclientprivate static LongHTTP_TIMEOUTprivate static org.slf4j.LoggerLOGGERprivate static StringPROP_CLIENT_TIMEOUTprivate static StringPROP_PREFIXprivate static StringPROP_WEBHOOK_URLprivate HttpRequest.BuilderrequestBuilderprivate static DurationtimeoutDuration-
Fields inherited from class io.debezium.server.BaseChangeConsumer
streamNameMapper
-
-
Constructor Summary
Constructors Constructor Description HttpChangeConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (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_WEBHOOK_URL
private static final String PROP_WEBHOOK_URL
- See Also:
- Constant Field Values
-
PROP_CLIENT_TIMEOUT
private static final String PROP_CLIENT_TIMEOUT
- See Also:
- Constant Field Values
-
HTTP_TIMEOUT
private static final Long HTTP_TIMEOUT
-
timeoutDuration
private static Duration timeoutDuration
-
client
private HttpClient client
-
requestBuilder
private HttpRequest.Builder requestBuilder
-
-
Method Detail
-
connect
@PostConstruct void connect() throws URISyntaxException- Throws:
URISyntaxException
-
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
-
-