
In many integration scenarios, messages must be exchanged between applications or systems. The Google Pub/Sub adapter is a Cloud Integration capability available on SAP Integration Suite that facilitates message publishing and subscription service.
You can use Google Pub/Sub Adapter in your message-based integration solutions with ease.
Google Pub/Sub works as a messaging middleware for traditional service integration or a simple communication medium for modern microservices.
Google Pub/Sub Adapter has the following features:
You can publish messages using Topics or you can read messages from a subscription.
In this blog, let us look at the Publish Message operation using the Topics entity.
A sample of the integration flow is shown in the figure below.
We use a Content Modifier to store the connection details like private key alias and email. Also message topic and subscription details like Topic ID, Project ID can be saved here.
Message body stores the message to be published.
The Connection tab contains connection and authentication parameters for Google Pub/Sub.
The Connection tab contains the following fields:
Parameter | Description |
Address | Specify the hostname pointing to the Google Pub/Sub service. Default: https://pubsub.googleapis.com |
Authentication Type | Select the method for authentication to Google Pub/Sub. Currently OAuth2 Service Account is supported. |
OAuth2 Token URL | Specify the OAuth2 Token URL which identifies as the authorization server for producing a JWT token internally. |
Client Email | Specify the Google Service Account Client Email. |
Private Key Alias | Specify the Google Service Account Private Key for authentication. |
Scope | Specify the scope of the connection to Google Pub/Sub service. Default: pubsub |
Reuse Connection | Enable the reuse of connection objects from the internal connection pool which in turn improves the network turnaround time for multiple communications to the same end point. |
Connection Timeout (in ms) | Specify the maximum waiting time (in milliseconds) for the connection to be established with Google Pub/Sub service. |
Response Timeout (in ms) | Specify the maximum waiting time (in milliseconds) for a response message to be received with Google Pub/Sub service.
|
Now switch to Processing, to perform the Publish Message operation.
Parameter | Description |
Entity | Select the entity for message processing:
|
Operation | Select the operation to be performed. |
Project ID | Specify the Google Pub/Sub project ID. |
Topic ID | Specify the Topic ID to be used. |
Operation Type | Select the type of operation when Operation is set to Publish Message. |
Encode Data | Enable to encode data to Base64. Note: Google Pub/Sub can only accept Base64 encoded data. If not enabled data must be converted to Base64 before using the adapter. |
Ordering Key | Specify the ordering key for this message. Note: For subscriptions with message ordering enabled, messages with the same ordering key are sent in the order in which they were published. |
Subscription ID | Specify the Subscription ID. |
Acknowledgement ID | Specify the Acknowledgement ID for the messages being used. |
Acknowledgement Deadline (in sec) | Specify the new acknowledgement deadline with respect to the time when this request is sent to the Google Pub/Sub system. |
Page Size | Specify the maximum number of topics to be returned. Example: 10 |
Page Token | Specify the value returned by the last ListTopicsResponse; indicates that this is a continuation of a prior topics.list call, and that the system should return the next page of data. |
Message Attributes | Specify multiple message attributes as key value pairs. Example: Set Key to status and Value to end_of_message |
Once you have a subscription set up to consume messages from your topic. You can see the below message when you PULL messages on the Google PubSub application.
98231231,John Doe,20
For detailed information about Google Pub/Sub adapter configuration, see Google PubSub Adapter Guide and Google PubSub Help.
Note: The Google PubSub Adapter is available as part of your SAP Integration Suite license.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
30 | |
18 | |
16 | |
16 | |
9 | |
8 | |
8 | |
8 | |
6 | |
6 |