Interface PushSubscriberHandler


public interface PushSubscriberHandler
Handles incoming PushRequest messages.
Since:
5.4.0
Author:
Jeremy Grelle
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSubscriber(@NonNull com.google.pubsub.v1.ProjectSubscriptionName projectSubscriptionName, @NonNull com.google.cloud.pubsub.v1.MessageReceiver receiver)
    Configure a MessageReceiver for the given subscription.
    @NonNull CompletableFuture<io.micronaut.http.MutableHttpResponse<Object>>
    handleRequest(@NonNull PushRequest pushRequest)
    Handle the incoming PushRequest received via HTTP request processing.
  • Method Details

    • handleRequest

      @NonNull @SingleResult @NonNull CompletableFuture<io.micronaut.http.MutableHttpResponse<Object>> handleRequest(@NonNull @NonNull PushRequest pushRequest)
      Handle the incoming PushRequest received via HTTP request processing. Implementations shall return an appropriate HTTP status code to signal either ack or nack to the PubSub service.
      Parameters:
      pushRequest - the incoming JSON push request message
      Returns:
      the HTTP response
    • addSubscriber

      void addSubscriber(@NonNull @NonNull com.google.pubsub.v1.ProjectSubscriptionName projectSubscriptionName, @NonNull @NonNull com.google.cloud.pubsub.v1.MessageReceiver receiver)
      Configure a MessageReceiver for the given subscription.
      Parameters:
      projectSubscriptionName - the subscription name
      receiver - the message receiver to bind to the subscription