apache-kafkamessage-queuepublish-subscribefire-and-forget

Fire And Forget vs Publish Subscribe


I know that Fire And Forget is a pattern that lets you add a message in the Messaging Queue and don't wait for an acknowledgment. Also, I know that Pub/Sub is a pattern that publishers will publish and subscribers will consume the data. What is the difference between these two patterns in the Message Queues(Kafka)?


Solution

  • In Kafka, it's exactly as you've described; there's no "vs" as it's different sides of the protocol and they aren't exclusive

    Disable producer acks, it's fire and forget. Producers always push.

    Consumers always subscribe.