Class NotificationService<P extends Partition,O extends OffsetContext>
java.lang.Object
io.debezium.pipeline.notification.NotificationService<P,O>
This service can be used to send notification to available and enabled channels
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IncrementalSnapshotNotificationService<P,
O> private final InitialSnapshotNotificationService<P,
O> private final List<NotificationChannel>
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationService
(List<NotificationChannel> notificationChannels, CommonConnectorConfig config, SchemaFactory schemaFactory, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) -
Method Summary
Modifier and TypeMethodDescriptionprivate Predicate<? super NotificationChannel>
private Predicate<? super NotificationChannel>
void
notify
(Notification notification) This method permits to just send a notification.void
notify
(Notification notification, Offsets<P, ? extends OffsetContext> offsets) This method permits to send a notification together with offsets.void
stop()
-
Field Details
-
notificationChannels
-
enabledChannels
-
incrementalSnapshotNotificationService
private final IncrementalSnapshotNotificationService<P extends Partition,O extends OffsetContext> incrementalSnapshotNotificationService -
initialSnapshotNotificationService
private final InitialSnapshotNotificationService<P extends Partition,O extends OffsetContext> initialSnapshotNotificationService
-
-
Constructor Details
-
NotificationService
public NotificationService(List<NotificationChannel> notificationChannels, CommonConnectorConfig config, SchemaFactory schemaFactory, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer)
-
-
Method Details
-
notify
This method permits to just send a notification. For the channels that implements ForConnectChannel
an empty Partition and Offset will be sent with theSourceRecord
- Parameters:
notification
- the notification to send
-
notify
This method permits to send a notification together with offsets. This make sense only for channels that implements ForConnectChannel
A notification is sent also to nonConnectChannel
- Parameters:
notification
- the notification to sendoffsets
- the offset to send together with KafkaSourceRecord
-
incrementalSnapshotNotificationService
-
initialSnapshotNotificationService
-
isEnabled
-
isConnectChannel
-
stop
public void stop()
-