Faizal Ahamed
Faizal Ahamed

Reputation: 140

Is it possible to set Delivery Time on kafka

I'm new to kafka. For example I post a message to topic via producer. All subscriber in that topic will get notified.

But I want to send delayed message based on scheduled time. I will post message with delivery time. And also i need to create multiple topics with different delivery time

Ex

> Topic: Topic_1, Message:"Good Morning", Delivery Time:9:00:00
> Topic: Topic_1, Message:"Good Afternoon", Delivery Time:13:00:00
> Topic: Topic_2, Message:"Good Morning", Delivery Time:9:30:00
> Topic: Topic_2, Message:"Good Afternoon", Delivery Time:13:30:00

Is it possible to do this? Or any other tools or software is available for my requirement? Or any other Technic/Method to do it via coding? i'm using php or Go Lang

Upvotes: 0

Views: 820

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191671

Kafka has no features for this. You'd need to enqueue the records in some application of your own, e.g. cron + loop over a file with timestamps, then pop from the file, check the time, and send to a Kafka producer. Most Kafka clients have methods for creating topics via AdminClient API

Upvotes: 2

Related Questions