Testing an event application locally
This guide demonstrates how to test an event type Connect application on your local machine using sample data.
GCP event message payload
Please note that all Google Cloud Platform event payload message.data is base64 encoded.
Your application must expose an
http server on port
Create the sample payload
The event application will be called via
POST request and the input is provided as the body payload.
For messages received by our application, there are two types of messages:
CloudEvent. This type is defined when you Create the Subscription.
The following example represents a new Cart being created using the PlatformFormat.
The following example represents an existing Cart being updated using the PlatformFormat.
The following example represents a new Cart being created using the CloudEventsFormat.
The following example represents an existing Cart being updated using the CloudEventsFormat.
Call your application
Call your application's endpoint with the message payload.
Review the results
Now that your application has been called, you should check your logs and/or your third party APIs to ensure your business logic was applied. Your application must reply with a
200 HTTP status code.