The notification email service consumes email requests from the Kafka notification topic and processes them to send them to a third-party service. Modules like PT, TL, PGR etc make use of this service to send messages through the Kafka Queue.
Kafka can not push notifications to consumers. Consumers have to keep polling/consuming messages in order to receive them. This is the only way messages stored in Kafka can flow to consumers.
Kafka stands out for its ability to handle high throughput and provide scalability, fault tolerance, and message retention. These features make Kafka ideal for a notification system where reliability and real-time processing are crucial.
Sending data to Kafka Topics There are following steps used to launch a producer: Step1: Start the zookeeper as well as the kafka server. Step2: Type the command: 'kafka-console-producer' on the command line. Step3: After knowing all the requirements, try to produce a message to a topic using the command:
Complete the following steps to receive messages that are published on a Kafka topic: Create a message flow containing a KafkaConsumer node and an output node. Configure the KafkaConsumer node by setting the following properties: On the Basic tab, set the following properties:
One very important and often missed detail is that Kafka supports exactly-once delivery only in Kafka Streams. To turn it on just change a config option processing. guarantee from at_least_once(default option) to exactly_once_v2.
Kafka can not push notifications to consumers. Consumers have to keep polling/consuming messages in order to receive them. This is the only way messages stored in Kafka can flow to consumers. The Consumer Design section in the Apache Kafka documentation explains why "consumer pulling" was choosed over "broker pushing".
Type your message into the command-line interface where the producer is running. Press enter to send the message. Open a new command-line interface tab or window, and start the Kafka console consumer to receive the messages. Use the same connection details as the producer.