Showing posts with the label GCP

Spring Boot + Google Cloud Pub/Sub Example

In this section, we will learn how to do asynchronous communication using Google Cloud Pub/Sub in combination with Spring Boot and Spring Integration. We will develop two Spring Boot applications, one producer and one consumer application, which will make use of Spring Integration to send and receive the messages. We will make use of GCP Pub/Sub as our messaging system in the Cloud. 1. Cloud Pub/Sub Asynchronous Message Service where producer and consumer are decoupled from each other while sending or receiving messages. No need to worry whether consumer might be up or running while producer is sending the message. Cloud Pub/Sub is going to retry sending message until it receives acknowledgement from consumer. Asynchronous  communications,  with latencies on the order of 100 milliseconds. Pub/Sub allows us to distributive events/data in real time. Highly scalable service. Popular products like Gmail and google search uses Cloud Pub/Sub infrastructure for communications. It can be confi