@cats-cradle/messaging-schemas
v2.1.0
Published
This contains Pub/Sub message schemas. These help provide loose coupling during async communication between microservices.
Downloads
3
Readme
@cats-cradle/messaging-schemas
This contains Pub/Sub message schemas. These help provide loose coupling during async communication between microservices.
- SNS topics are deployed with the message broker.
- SQS deployments should be owned by consumer.
Naming Convention
CONTEXT - VERB - CATEGORY
e.g.
- EmailSendCommand
- UserPasswordResetEvent
- PlayerDisconnectedEvent
- CharacterRankRequest
Message Categories
Command Command send a idempotent request to a topic asking subscribers to perform task. The consumer of a command does not inform or provide a response to the publisher. The publisher expects 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