Skip to content

Instantly share code, notes, and snippets.

@computerphysicslab
Last active July 10, 2020 10:52
Show Gist options
  • Save computerphysicslab/7cd110d48011ad75a44aece51b545d17 to your computer and use it in GitHub Desktop.
Save computerphysicslab/7cd110d48011ad75a44aece51b545d17 to your computer and use it in GitHub Desktop.

Message brokers vs. APIs

REST APIs must be designed to expect an immediate response. If the client receiving the response is down, the sending service will be blocked while it awaits the reply. Failover and error handling logic should be built into both services.

Message brokers enable asynchronous communications between services so that the sending service need not wait for the receiving service’s reply. This improves fault tolerance and resiliency in the systems in which they’re employed. In addition, the use of message brokers makes it easier to scale systems since a pub/sub messaging pattern can readily support changing numbers of services. Message brokers also keep track of consumers’ states.

https://www.ibm.com/cloud/learn/message-brokers

https://kafka.apache.org/uses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment