JAVAMS06 Integrating Pub/Sub with Spring

Опубликовано: 29 Март 2026
на канале: Backyard Techmu by Adrianus Yoga
269
6

Overview
In this series of labs, you take a demo microservices Java application built with the Spring framework and modify it to use an external database server. You adopt some of the best practices for tracing, configuration management, and integration with other services using integration patterns.

In this lab, you use Spring Integration to create a message gateway interface. This interface abstracts from the underlying messaging system rather than using direct integration with Pub/Sub.

Using this approach, you can swap messaging middleware that works with on-premises applications for messaging middleware that works with cloud-based applications. This approach also makes it easy to migrate between messaging middleware.

In this lab, you use Spring Integration to add the message gateway interface and then refactor the code to use this interface rather than implementing direct integration with Pub/Sub.

Objectives
In this lab, you learn how to perform the following tasks:
Add Spring Integration Core to an application
Create an outbound message gateway in your application
Configure an application to publish messages through a gateway
Bind the output channel of a message gateway to Pub/Sub
#gcp #googlecloud #qwiklabs #learntoearn