Pub/Sub Delayer Service Architecture

Components Overview

Components

As seen in the diagram above, we use the following Google Cloud Platform services to resolve the task of delaying pubsub messages:

Service consists of two components:

Technical details

As shown in the diagram above, the effort to provide a scalable and reliable mechanism, to provide delaying of Pub/Sub messages should be relatively low compared to the alternative solutions:

  • A client is publishing the Pub/Sub message with the desired delay to the delay topic.

  • The message is picked up by the Task Creator that assembles the task and then invokes the Google Cloud Task API and also handles retries in case of issues.

  • After the delay of a task is expired, the Google Cloud Task delivers the task to the Pub/Sub topic using the HTTP endpoint.