Hi,
We have different types of messages. Some are security alerts to be pushed to devices and others are alerts for billing cycles, Standing orders and announcements. Moreover all messages are not uniformly handled by the consumer. Some are push notifications and others are routed to the Elastic search Kafka Connector Sink.
Kafka JDBC connectors are what we are looking at to pick up DB changes.
So I am looking for some material to read to understand how to partition and cluster. I will be able map the general guidance to our requirements.
How do I handle security alerts as high priority messages ?
Can Kafka JDBC connectors be scheduled to pick up from the DB ? I could have a clustered scheduler to send to the producer as an alternative.
Hi there! I’d need a little more information to answer 1. Are all of these messages being picked up from the database or are they from different sources?
Re: 2. JDBC source connectors can be scheduled in that you can tell them to run every 5 mins, 30 sec, etc.
Kafka doesn’t have “priorities” like other messaging systems do. What we do for kafka is create different topics for different message types and route the messages appropriately. Also because kafka doesn’t really have a limitation on the number of consumers we simply designate a consumer group to read and act on those high priority messages.
The JDBC connector has poll.interval.ms which allows you to tune how frequently the JDBC source connector polls for new rows. But it does not contain a “scheduler”.
You can schedule fetches with pause/resume and bulk mode but that is probably not the path you want to go down.
That was a good overview. Consumer groups for Kafka Connect and other groups based on what the consumers do can be set up. A SMS system interaction in the consumer is a separate group from a Push notification group. Is a group based on what happens in the consumer ?
Can we have DLQs for each consumer group based on whether an SMS is sent or a Firebase Push is done ?
@mohanr Yes you can but you’ll have to do the codeing for the DLQ your self. Kafka doesn’t have a traditional DLQ functionality like other messaging systems.