Interface ConsumerRegistry
- All Known Implementing Classes:
NatsConsumerAdvice
public interface ConsumerRegistry
A registry for created Nats consumers.
- Since:
- 3.1.0
- Author:
- jgrimm
-
Method Summary
Modifier and TypeMethodDescription@NonNull io.nats.client.ConsumergetConsumer(@NonNull String id) Returns the subscription by given id.The IDs of the available consumers.@NonNull Set<io.nats.client.Subscription> getConsumerSubscription(@NonNull String id) Returns a managed Consumer's subscriptions.io.nats.client.SubscriptionnewSubscription(@NonNull String connectionName, @NonNull String subject, @Nullable String queue) Create a new subscription from the given connection name.io.nats.client.SubscriptionnewSubscription(@NonNull String subject, @Nullable String queue) Create a new subscription with the default connection.
-
Method Details
-
getConsumer
Returns the subscription by given id.- Parameters:
id-StringThe id of the listener- Returns:
- The consumer
- Throws:
IllegalArgumentException- If no listener exists for the given ID
-
getConsumerIds
-
getConsumerSubscription
Returns a managed Consumer's subscriptions.- Parameters:
id- The id of the producer.- Returns:
- The consumer subscription
- Throws:
IllegalArgumentException- If no consumer exists for the given ID
-
newSubscription
-
newSubscription
-