From 6bf2f292ac88b80924e6e07058b6ff48dd91ad0f Mon Sep 17 00:00:00 2001 From: Fiore Mario Vitale Date: Thu, 8 Jun 2023 10:20:10 +0200 Subject: [PATCH] DBZ-6424 Apply suggestions from code review Co-authored-by: roldanbob --- .../pages/configuration/notification.adoc | 14 +++---- .../ROOT/pages/configuration/signalling.adoc | 41 ++++++++++--------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/documentation/modules/ROOT/pages/configuration/notification.adoc b/documentation/modules/ROOT/pages/configuration/notification.adoc index 01bad0b91..81403cb8c 100644 --- a/documentation/modules/ROOT/pages/configuration/notification.adoc +++ b/documentation/modules/ROOT/pages/configuration/notification.adoc @@ -195,22 +195,22 @@ To use the `sink` notification channel, you must also set the `notification.sink [id="access-debezium-jmx-notifications"] === Access to {prodname} JMX notifications -To access to notification provided through JMX bean you need to: +To enable {prodname} to report events that are exposed through JMX beans, complete the following configuration steps: -* xref:operations/monitoring.adoc[Enable JMX MBean Server] to expose the notification bean. +* {link-prefix}:{link-debezium-monitoring}#monitoring-debezium[Enable JMX MBean Server] to expose the notification bean. * Add `jmx` to the `notification.enabled.channels` configuration property. -* Connect with your preferred client to the MBean Server. +* Connect your preferred JMX client to the MBean Server. -Notifications are exposed in the bean named `debezium..management.notifications.` through the `Notifications` attribute. +Notifications are exposed in the bean named `debezium.____.management.notifications.____` through the `Notifications` attribute. -The image below shows the notification about the start of the incremental snapshot +The following image shows a notification that reports the start of an incremental snapshot: image::jmx-notification-attribute.png[JMX notification attribute] -You can also discard the notifications by calling the `reset` operation on the bean. +To discard a notification, call the `reset` operation on the bean. The notifications are also exposed as a JMX notification with type `debezium.notification`. -You can link:https://docs.oracle.com/javase/tutorial/jmx/notifs/index.html[subscribe to receive these notifications] in your application. +To enable an application to receive JMX notifications, link:https://docs.oracle.com/javase/tutorial/jmx/notifs/index.html[subscribe the application to the notifications]. // Type: concept [id="debezium-notification-custom-channel"] diff --git a/documentation/modules/ROOT/pages/configuration/signalling.adoc b/documentation/modules/ROOT/pages/configuration/signalling.adoc index 4f048372a..c203dd594 100644 --- a/documentation/modules/ROOT/pages/configuration/signalling.adoc +++ b/documentation/modules/ROOT/pages/configuration/signalling.adoc @@ -17,10 +17,10 @@ endif::community[] The {prodname} signaling mechanism provides a way to modify the behavior of a connector, or to trigger a one-time action, such as initiating an xref:debezium-signaling-ad-hoc-snapshots[ad hoc snapshot] of a table. To use signals to trigger a connector to perform a specified action, you can configure the connector to use one or more of the following channels: -SourceSignalChannel:: You can issue a SQL command to add a signal message to a specialized signaling data-collection. -The signaling data-collection, which you create on the source database, is designated exclusively for communicating with {prodname}. +SourceSignalChannel:: You can issue a SQL command to add a signal message to a specialized signaling data collection. +The signaling data collection, which you create on the source database, is designated exclusively for communicating with {prodname}. KafkaSignalChannel:: You submit signal messages to a configurable Kafka topic. -JmxSignalChannel:: You submit signal through the `signal` JMX operation. +JmxSignalChannel:: You submit signals through the JMX `signal` operation. Custom:: You submit signals to a xref:debezium-custom-signaling-channel[custom channel] that you implement. When {prodname} detects that a new xref:debezium-signaling-example-of-a-logging-record[logging record] or xref:debezium-signaling-example-of-an-ad-hoc-signal-record[ad hoc snapshot record] is added to the channel, it reads the signal, and initiates the requested operation. @@ -197,24 +197,25 @@ Value = `{"type":"execute-snapshot","data": {"data-collections": ["schema1.table // Type: procedure // Title: Enabling the {prodname} JMX signaling channel [id="debezium-signaling-enabling-jmx-signaling-channel"] -== Enabling JMX signaling channel +== Enabling a JMX signaling channel -You can enable the JMX signaling channel by adding `jmx` to the `signal.enabled.channels` configuration property. +You can enable the JMX signaling by adding `jmx` to the `signal.enabled.channels` configuration property, and then {link-prefix}:{link-debezium-monitoring}#monitoring-debezium[enabling the JMX MBean Server] to expose the signaling bean. -Then you need xref:operations/monitoring.adoc[to enable JMX MBeanServer] to expose the signaling bean. +\\ Title: Using a JMX signaling channel to send signals to {prodname} +[id="debezium-signaling-using-a-jmx-signaling-channel-to-sends-signals"] +=== Sending JMX signals -=== Send signal - -First of all, you need to connect to the `MBeanServer` through your preferred tool (i.e. jconsole, JDK Mission Control) , then you need to search for a bean named `debezium..management.signals.` - -This bean expose the `signal` operation that take in input three parameters: - -p0:: id of the signal -p1:: type of the signal for example `execute-snapshot` -p2:: json data field that contains additional information for the specific signal type. - -When the signal type is set to `execute-snapshot`, the `data` field must include the fields that are listed in the following table: +.Procedure +1. Use your preferred JMX client (for example. JConsole or JDK Mission Control) to connect to the MBean server. +2. Search for the Mbean `debezium.____.management.signals.____`. +The Mbean exposes `signal` operations that accept the following input parameters: +p0:: The id of the signal. +p1:: The type of the signal, for example, `execute-snapshot`. +p2:: A JSON data field that contains additional information about the specified signal type. ++ +Send an `execute-snapshot` signal by providing value for the input parameters. + In the JSON data field, include the information that is listed in the following table: ++ .Execute snapshot data fields [cols="2,2,6",options="header"] |=== @@ -234,9 +235,9 @@ Specify the names by using the same format as is required for the xref:{context} |_N/A_ | An optional string that specifies a condition that the connector evaluates to designate a subset of records to include in a snapshot. |=== - -The following image shows how to send signal from `jconsole` - ++ +The following image shows an example of how to use JConsole to send a signal: ++ image::jmx-signal-operation.png[] // Type: concept