Configuration of the Kafka_ErrorHandlingSample Processes

Kafka_ErrorHandlingSample

The sample project contains two processes. After Importing the Sample Project, expand the Processes resource to display the processes.

This sample project contains the following processes:

  • SendKafka.bwp
  • KafkaErrorHandling.bwp

SendKafka.bwp

The SendKafka.bwp process demonstrates how to use the plug-in to send messages to the Kafka server, which are then consumed by the KafkaErrorHandling.bwp process. KafkaSendMessage activity is used here to send 50 messages to a kafka topic specified in the activity configuration.

KafkaErrorHandling.bwp

The KafkaErrorHandling.bwp process demonstrates how to use the plug-in for handling errors during Kafka receive. It contains a ReceiveMessage process starter that listens for incoming message event and receives the 50 messages sent using SendKafka.bwp. The first Java Invoke error occurs on every 5th offset and the second Java Invoke error occurs on every 7th offset. The error messages are then sent to KafkaSendMessage activity, which in turn sends them to the specified topic. 16 messages error out and remaining 34 go through the success transition.