Using the Groovy Event Logger with Apache Kafka
You can use the Groovy Event Logger to send reporting events to an Apache Kafka topic.
The following prerequisites must be met in order to enable sending of the reporting events to Apache Kafka via Groovy Event Logger:
- Existing Kafka cluster must be present. It should be running brokers of version “0.10.1.0” or newer.
- Minimum JRE 8 is required.
- OpenJDK 11 is recommended.
- Sending of the reporting events to Apache Kafka is supported by using Groovy Event Logger and Java Kafka client and requires Java in order to work. If Java is not installed or not properly configured, this functionality will not be available. All required jar files are provided in IP. Java should be correctly configured in Interaction Server options. See Java configuration in the Integrated Capture Point Guide.
Configure Interaction Server application object
Add the following jars from the Interaction Server installation folder to the -Djava.class.path option in the jvm-options section:
Configure Kafka Groovy Event Logger application object
To configure Kafka Groovy Event Logger application object:
- Import the application template from GroovyEventLoggerTemplates/KafkaGroovyEventLogger.apd from the Interaction Server installation folder.
- Create a new application using the newly imported application template.
- Fill in the usual mandatory settings on the General and DB Info tabs. Following mandatory settings are not used and can be filled with the arbitrary values like:
- DBMS Name = groovy
- DBMS Type = DB2
- Username = groovy
- Verify value of logger-settings/script-classpath points to lib/KafkaEventLogger in the Interaction Server installation folder.
- Specify the following options in the new application:
- kafka-settings/servers - comma-separated list of the Kafka broker(s) to connect to initially
- kafka-settings/topic - topic to send reporting events to
- Specify the following option in the new application if you want to send messages in Genesys binary format rather than in JSON (default)
- On Interaction Server’s Connections tab, add a connection to the DAP.
Advanced Java Kafka Client Options
Java Kafka client used for communication with the Kafka cluster has many configurable options. Options specified in the producer-options section are passed to the Java Kafka producer as is. Producer is used to send message to the Kafka cluster. The list of options can be found on the official page. Any of these options can be configured in this section except bootstrap.server. Value of kafka-settings/servers is used for the latter option.