Posts

Showing posts with the label ipc

Asynchronous Interprocess Communication with Spring Boot and Amazon SQS

Very frequently microservices need to talk to each other. For performance reasons, this communication is done asynchronously. There are two major models of asynchronous interprocess communication(IPC). Point-to-point communication Communication is from a particular microservice to another. The client sends a message to the consumer, the consumer process the message and may send a message back to the client if a response is expected. Publish-subscriber A single microservice broadcasts a message which is then consumed by zero or more microsevices which are listening for this particular message type of message. This post is focused on implementing point to point communication between two microservices using Spring Boot, Java Messaging System(JMS) and Amazon SQS. SQS Queues A message queue hold all the messages of a particular type for a microservice to process. Microservices communicate by sending messages to each other's queue. Maven dependencies Three dependencies