1.0.0 • Published 1 year ago

@cats-cradle/message-broker v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

@cats-cradle/message-broker

This is a “Pub/Sub Message Broker”. It enables async communication between microservices to provide loosely coupling.

  • SNS topics are deployed with the message broker.
  • SQS deployments should be owned by consumer.

Message Categories

Command Command send a idempotent request to a topic asking subscribers to perform task. The consumer of a command does not inform provide a response to the publisher. The publisher does expect something to occur as a result of the request.

Publisher -> SNS -> SQS -> Consumer

Event Publish to a SNS topic informing any subscribers that something occurred within a given system. Events published may be significant events that were published only for the purpose of data retention and analytic purposes.

Publisher -> SNS -> SQS -> Consumer

Request Publish an async message to a single queue letting them know which queue to send a reply to.

Publisher -> SQS -> Consumer -> (SQS -> Publisher)

Reply In response to a request publish an message to a single queue as request.

(Publisher -> SQS) -> Consumer -> SQS -> Publisher

TODO

  • Add a feature to make it easy for apps to publish to events.
  • Add a feature to make it easy to subscribe to events.
  • Provision S3 bucket and place all history of all events into.
  • Save all messages received to bucket.
  • Indicate whether message was sent only for testing / debugging purposes and should not contaminate history.
  • Hydration that ties into api-client query might be nifty.
  • logical id format
  • decouple topics from broker into global lib

Documentation