Following documentation, there are multiple ways to integrate Google Cloud PubSub events with Spring application:
Spring Cloud GCP has several modules for sending messages to Pub/Sub topics and receiving messages from Pub/Sub subscriptions using the Spring Framework. You can use these modules independently or combine them for different use cases:
- Spring Cloud GCP Pub/Sub Starter lets you send and receive messages using helper classes and call the Pub/Sub Java client library for more advanced scenarios.
- Spring Integration Channel Adapters for Pub/Sub let you connect Spring Integration Message Channels with Pub/Sub.
- Spring Cloud Stream Binder for Pub/Sub lets you use Pub/Sub as messaging middleware in Spring Cloud Stream applications.
I don't have full understanding - what are those different use cases mentioned, and how to determine, which module is best for which use case?
Application (Dockerized Spring Boot app, deployed to Kubernetes in GCP) I am working on is rather simple, it is expected to act upon received PubSub event, it is not going to publish any events itself.