Reputation: 3676
Is there a feature in Kafka (or other message queues) through which we can add messages which will become active only of the time specified. Which means that message should not be consumed before the specified time.
Follow up, is there a way through which we can move those messages to the front of queue when it reaches scheduled time.
Upvotes: 0
Views: 2206
Reputation: 4314
Not in the Kafka broker itself, but you can do this using Kafka Streams by defining a custom Processor, which does the following:
Upvotes: 1
Reputation: 3981
Kafka cannot do this. Kafka is basically just a commit log which will write the messages in the order in which they are received and read them in he same order.
However other more traditional messaging brokers can do it - for example ActiveMQ Artemis has support for scheduled messages. I do not think the message will move within the queue, but it will not be consumed before the scheduled time.
Upvotes: 1