BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Google Previews the Exactly-Once Delivery Feature for Its Pub/Sub Service

Google Previews the Exactly-Once Delivery Feature for Its Pub/Sub Service

This item in japanese

Bookmarks

Recently, Google announced the preview of the exactly-once delivery feature for its Pub/Sub Service. Pub/Sub guarantees that subscriptions do not receive duplicate deliveries of messages when enabling the feature.

Google Pub/Sub is a messaging service available on the Google Cloud Platform (GCP). It allows services to communicate asynchronously through queues. Furthermore, it supports the ingestion and integration of event streams and in-ordered delivery. The latest feature for the service is exactly-once delivery when receiving messages and delivering them to its subscribers. 

Richard Seroter, director of outbound product management at Google Cloud, tweeted:

One of the most unique messaging services in the cloud is @googlecloud Pub/Sub. It's queuing, notifications, and log-style replay, all in one. Until now, we offered at-least-once delivery. Now? We're previewing an exactly-once delivery.

When Google Pub/Sub users enable the feature on subscriptions, the service will, according to the documentation, guarantee that no redelivery occurs once the message has been successfully acknowledged. In addition, it ensures no redelivery occurs while a message is outstanding, which means until the acknowledgment deadline expires or the message is acknowledged. Furthermore, subscriptions with exactly-once delivery enabled don't receive duplicate deliveries.

However, according to another part of the documentation, there are some exceptions to this at-least-once behavior when a message is published before a given subscription was created or when the message within the configured message retention duration is deleted.

Users can create a pull or push subscription using the Cloud Console, the Google Cloud CLI, or the Pub/Sub API. Moreover, they can now configure (enable) the exactly-once delivery. Finally, subscribers can receive messages from these subscriptions, including those that use the StreamingPull API.  

Nik Eleftheriou, an EMEA CPG industry practice lead at Google, stated in a tweet:

Even though acting only once on a pubsub message is something that can be coded at the application level, it does not hurt having it as a baked-in feature. Glad we are able to provide this.

Furthermore, Google also, for instance, added the at-least-once delivery flag to the Node.js client for Google Cloud Pub/Sub

Other public cloud providers AWS and Microsoft, also offer messaging services on their cloud platform. For instance, AWS with Simple Queue Service (SQS). This service also supports exactly-once delivery in FIFO queues. However, with its Service Bus messaging service, Microsoft does not. On the other hand, their streaming service Azure Stream Analytics does support it. 

Google Pub/Sub is currently available in all GCP regions, and pricing details can be found in the pricing guide.

About the Author

Rate this Article

Adoption
Style

BT