Interface PushConsumerRegistry

All Known Implementing Classes:
JetStreamPushConsumerAdvice

public interface PushConsumerRegistry
A registry for jetstream push consumers.
Since:
4.0.0
Author:
Joachim grimm
  • Method Summary

    Modifier and Type
    Method
    Description
    io.nats.client.JetStreamSubscription
    newSubscription(@NonNull String subject, @NonNull io.nats.client.PushSubscribeOptions pushSubscribeOptions, @Nullable String queue)
    Create a new push consumer with the default connection.
    io.nats.client.JetStreamSubscription
    newSubscription(@NonNull String connectionName, @NonNull String subject, @NonNull io.nats.client.PushSubscribeOptions pushSubscribeOptions, @Nullable String queue)
    Create a new push consumer from the given connection name.
  • Method Details

    • newSubscription

      io.nats.client.JetStreamSubscription newSubscription(@NonNull @NonNull String subject, @NonNull @NonNull io.nats.client.PushSubscribeOptions pushSubscribeOptions, @Nullable @Nullable String queue) throws io.nats.client.JetStreamApiException, IOException
      Create a new push consumer with the default connection.
      Parameters:
      subject - String
      pushSubscribeOptions - PushSubscribeOptions
      queue - String optional
      Returns:
      subscription JetStreamSubscription
      Throws:
      io.nats.client.JetStreamApiException - in case of a jetstream error
      IOException - in case of a connection error
    • newSubscription

      io.nats.client.JetStreamSubscription newSubscription(@NonNull @NonNull String connectionName, @NonNull @NonNull String subject, @NonNull @NonNull io.nats.client.PushSubscribeOptions pushSubscribeOptions, @Nullable @Nullable String queue) throws io.nats.client.JetStreamApiException, IOException
      Create a new push consumer from the given connection name.
      Parameters:
      connectionName - String
      subject - String
      pushSubscribeOptions - PushSubscribeOptions
      queue - String optional
      Returns:
      subscription JetStreamSubscription
      Throws:
      io.nats.client.JetStreamApiException - in case of a jetstream error
      IOException - in case of a connection error