【问题标题】:Does Kafka send notification fo all consumers that new message has arrived?Does Kafka send notification fo all consumers that new message has arrived?
【发布时间】:2022-12-28 08:30:58
【问题描述】:

Imagine there are 1 producer and 1000 consumers with same group id (the producer and consumer group id is not the same). When message arrived and Kafka place it to the queue, does Kafka send notification to 1000 consumers that new message has been arrived (and after that, only one consumer takes the message)? If it's not, how does consumer know that new message has been arrived? Does Kafka send notification fo all consumers that new message has arrived?

【问题讨论】:

    标签: apache-kafka rabbitmq spring-kafka


    【解决方案1】:

    Kafka works differently.

    In the case you describe, all consumers would regularly try to fetch messages from the brokers. Thus, it's not necessary for the broker to send a notification, because the consumer pro-actively poll for new messages anyway.

    【讨论】:

      猜你喜欢
      • 2022-12-27
      • 2019-09-24
      • 2019-07-13
      • 2021-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-28
      • 1970-01-01
      相关资源
      最近更新 更多