Google Pub/Sub Inbound Endpoint ReferenceΒΆ The following sections provide a detailed reference for the Google Pub/Sub Inbound Endpoint in WSO2 Micro Integrator. Below table shows the configuration for the polling consumer for an already exist subscription. Parameter Description Required Default Value name The name of the inbound endpoint. Yes None Polling Interval The interval at which the inbound endpoint polls for new events from Google pub/sub. No 100 Endpoint The endpoint details (host:port) of the Google server to connect to. Yes pubsub.googleapis.com:443 Project Id The Google Cloud project identifier where the Pub/Sub resources (topics/subscriptions) are managed. Yes None Subscription Id The ID of the Pub/Sub subscription to which the consumer should connect to receive messages. Yes None Service Account Key File Path Absolute path to the service account JSON key file used to authenticate with Google Cloud Pub/Sub APIs. If not specified, the client will attempt to load default credentials from the environment variable GOOGLE_APPLICATION_CREDENTIALS (e.g., export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json), or use the default service account when running on Google Cloud. No None Parallel Consumer Count The number of parallel pull consumers used to fetch messages from the subscription. Each consumer maintains its own stream connection to Pub/Sub. Increasing this can improve throughput but may increase resource usage. No 1 Thread Count Per Consumer Number of threads allocated for processing messages per consumer. This controls how many messages can be processed concurrently by each pull worker. No 5 Max Outstanding Message Count The maximum number of unacknowledged messages allowed in memory before the client applies flow control and pauses message delivery. Helps limit memory usage and controls backpressure. No 1000 Max Outstanding Message Size The maximum total size (in MB) of unacknowledged messages buffered in memory. Once this limit is reached, message delivery is paused until space is available. This prevents the subscriber from running out of memory due to high message volume. No 100MB If you want MI to create/update the Google pub/sub subscription, you can configure the below parameters accordingly as described below. Parameter Description Required Default Value Create Subscription on Connect Specifies whether WSO2 MI should automatically create the Pub/Sub subscription if it does not already exist. No false Update Subscription If Exists Determines whether WSO2 MI should update the subscription if it already exists (e.g., to modify settings such as acknowledgment deadline or message retention). Topic, Message Ordering and Filter for a given subscription cannot be updated. In a scenario you have enabled this parameter and client identifies a mistmatch in message ordering and filtering configuration , the existing subscription will be deleted and a new subscription will be created. No false Topic Id The ID of the Pub/Sub topic to subscribe to. Required only if subscription creation or update is enabled. No None Enable Message Ordering When enabled, the subscriber receives messages that share the same ordering key in the exact order they were published. This guarantees per-key message ordering, assuming the topic also has message ordering enabled and publishers specify an ordering key. This is particularly useful when processing messages that must maintain a specific sequence, such as transaction logs or user session events No None Message Filter A Pub/Sub filter expression to control which messages are delivered to the subscription. Messages that do not match are discarded. Choose valid filter configuration according to Pub/Sub Documentation - Filter messages from a subscription No None Acknowledgement Deadline (seconds) The maximum time the subscriber has to acknowledge each message. If not acknowledged within this period (between 10 and 600 seconds), the message will be redelivered. If you have set sequential=true, make sure to tune the Ack deadline according to the max processing time the mediation could spend. No 10 Message Retention Duration (minutes) How long unacknowledged messages are retained in the subscription. If "Retain Acked Messages" is enabled, acknowledged messages are also retained for the same duration. Allowed range: 10 minutes to 31 days. No 10080 Retain Acked Messages When enabled, acknowledged messages will be retained in the subscription's backlog for the configured retention duration. No false Enable Exactly Once Delivery Ensures that each message is delivered exactly once without duplicates, as long as messages are acknowledged before the deadline. No false Dead Letter Topic The topic to which messages that exceed the maximum delivery attempts are sent (dead letter policy). No None Max Delivery Attempts Maximum number of delivery attempts for a message before it is sent to the dead letter topic. No 5 Min BackOff Duration (seconds) The minimum delay before the first redelivery attempt of a failed message. No 10 Max BackOff Duration (seconds) The maximum delay for redelivery retries. Pub/Sub will not delay redelivery longer than this value. No 600 Labels Key-value pairs used to label the subscription. Format: key1=value1,key2=value2 No None Note When message ordering is enabled for the subscription, to ensure the messages are consumed and processed in the same order as they were published the below recommendations needs to be followed. Recommendation: Inbound endpoint should be configured setting sequential=true A synchronous mediation flow should be used Max Outstanding Message Count for the subscriber should be set to 1 Enabling message ordering may increase latency due to strict sequencing constraints. There is no restriction on increasing the Parallel Consumer Count, as messages with a single ordering key are always processed by a single subscriber stream.