Does Kafka support priority for topic or message?

前端 未结 4 1532
夕颜
夕颜 2020-12-15 07:40

I was exploring the fact whether Kafka supports priority for any queue or message to process.

It seems it doesn\'t support any such thing. I googled and found this m

4条回答
  •  臣服心动
    2020-12-15 08:10

    Solution would be to create 3 different topics based on priorities.

    • High Priority Topic
    • Medium Priority Topic
    • Low Priority Topic

    As a general rule of thumb, Number of Consumers for High Priority Topic > Number of consumers for Medium Priority Topic > Number of consumers for Low Priority Topic.

    In this way, it will be guaranteed messages arriving in High Priority Topic will be processed faster than low priority topic.

提交回复
热议问题