SubscriptionClient Class
- java.
lang. Object - com.
microsoft. azure. servicebus. primitives. ClientEntity - com.
microsoft. azure. servicebus. InitializableEntity - com.
microsoft. azure. servicebus. SubscriptionClient
- com.
- com.
- com.
Implements
public final class SubscriptionClient
extends com.microsoft.azure.servicebus.InitializableEntity
implements ISubscriptionClient
Field Summary
Modifier and Type | Field and Description |
---|---|
static final String | DEFAULT_RULE_NAME |
Constructor Summary
Method Summary
Methods inherited from ClientEntity
Methods inherited from java.lang.Object
Field Details
DEFAULT_RULE_NAME
public static final String DEFAULT_RULE_NAME
Constructor Details
SubscriptionClient
public SubscriptionClient(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode)
Parameters:
Throws:
SubscriptionClient
public SubscriptionClient(String namespace, String subscriptionPath, ClientSettings clientSettings, ReceiveMode receiveMode)
Parameters:
Throws:
SubscriptionClient
public SubscriptionClient(URI namespaceEndpointURI, String subscriptionPath, ClientSettings clientSettings, ReceiveMode receiveMode)
Parameters:
Throws:
Method Details
abandon
public void abandon(UUID lockToken)
Abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message
Parameters:
Throws:
abandon
public void abandon(UUID lockToken, TransactionContext transaction)
Abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message
Parameters:
Throws:
abandon
public void abandon(UUID lockToken, Map
Abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message
Parameters:
Throws:
abandon
public void abandon(UUID lockToken, Map
Abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message
Parameters:
Throws:
abandonAsync
public CompletableFuture
Asynchronously abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.
Parameters:
abandonAsync
public CompletableFuture
Asynchronously abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.
Parameters:
abandonAsync
public CompletableFuture
Asynchronously abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.
Parameters:
abandonAsync
public CompletableFuture
Asynchronously abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.
Parameters:
addRule
public void addRule(RuleDescription ruleDescription)
Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
Parameters:
Throws:
addRule
public void addRule(String ruleName, Filter filter)
Adds a rule with specified name and Filter to the current subscription to filter the messages reaching from topic to the subscription.
Parameters:
Throws:
addRuleAsync
public CompletableFuture
Asynchronously adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
Parameters:
addRuleAsync
public CompletableFuture
Asynchronously adds a rule with specified name and Filter to the current subscription to filter the messages reaching from topic to the subscription.
Parameters:
complete
public void complete(UUID lockToken)
Completes a Message using its lock token. This will delete the message from the service.
Parameters:
Throws:
complete
public void complete(UUID lockToken, TransactionContext transaction)
Completes a Message using its lock token. This will delete the message from the service.
Parameters:
Throws:
completeAsync
public CompletableFuture
Asynchronously completes a Message using its lock token. This will delete the message from the service.
Parameters:
completeAsync
public CompletableFuture
Asynchronously completes a Message using its lock token. This will delete the message from the service.
Parameters:
deadLetter
public void deadLetter(UUID lockToken)
Moves a Message to the deadletter sub-queue.
Parameters:
Throws:
deadLetter
public void deadLetter(UUID lockToken, TransactionContext transaction)
Moves a Message to the deadletter sub-queue.
Parameters:
Throws:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription)
Moves a Message to the deadletter sub-queue with deadletter reason and error description.
Parameters:
Throws:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction)
Moves a Message to the deadletter sub-queue with deadletter reason and error description.
Parameters:
Throws:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map
Moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.
Parameters:
Throws:
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map
Moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.
Parameters:
Throws:
deadLetter
public void deadLetter(UUID lockToken, Map
Moves a Message to the deadletter sub-queue with modified message properties.
Parameters:
Throws:
deadLetter
public void deadLetter(UUID lockToken, Map
Moves a Message to the deadletter sub-queue with modified message properties.
Parameters:
Throws:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with deadletter.
Parameters:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with deadletter.
Parameters:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description.
Parameters:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description.
Parameters:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.
Parameters:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.
Parameters:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with modified properties.
Parameters:
deadLetterAsync
public CompletableFuture
Asynchronously moves a Message to the deadletter sub-queue with modified properties.
Parameters:
getEntityPath
public String getEntityPath()
Gets the path of the entity this client is sending messages to or receiving messages from.
getPrefetchCount
public int getPrefetchCount()
Get the prefetch value set.
getReceiveMode
public ReceiveMode getReceiveMode()
Gets the ReceiveMode of the current receiver
getRules
public Collection
Get all rules associated with the subscription.
Throws:
getRulesAsync
public CompletableFuture
Get all rules associated with the subscription.
getSubscriptionName
public String getSubscriptionName()
Gets the subscription name.
getTopicName
public String getTopicName()
Gets the name of the topic, for this subscription.
onClose
protected CompletableFuture
Overrides:
SubscriptionClient.onClose()registerMessageHandler
@Deprecated
public void registerMessageHandler(IMessageHandler handler)
Receive messages continuously from the entity. Registers a message handler and begins a new thread to receive messages. IMessageHandler methods are executed on java.util.concurrent.commonPool()
Parameters:
Throws:
registerMessageHandler
@Deprecated
public void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions)
Receive messages continuously from the entity. Registers a message handler and begins a new thread to receive messages. IMessageHandler methods are executed on java.util.concurrent.commonPool()
Parameters:
Throws:
registerMessageHandler
public void registerMessageHandler(IMessageHandler handler, MessageHandlerOptions handlerOptions, ExecutorService executorService)
Receive messages continuously from the entity. Registers a message handler and begins a new thread to receive messages. IMessageHandler methods are executed on the passed executor service.
Parameters:
Throws:
registerMessageHandler
public void registerMessageHandler(IMessageHandler handler, ExecutorService executorService)
Receive messages continuously from the entity. Registers a message handler and begins a new thread to receive messages. IMessageHandler methods are executed on the passed executor service.
Parameters:
Throws:
registerSessionHandler
@Deprecated
public void registerSessionHandler(ISessionHandler handler)
Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. ISessionHandler methods are executed on java.util.concurrent.commonPool()
Parameters:
Throws:
registerSessionHandler
@Deprecated
public void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions)
Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. ISessionHandler methods are executed on java.util.concurrent.commonPool()
Parameters:
Throws:
registerSessionHandler
public void registerSessionHandler(ISessionHandler handler, SessionHandlerOptions handlerOptions, ExecutorService executorService)
Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. ISessionHandler methods are executed on the passed executor service.
Parameters:
Throws:
registerSessionHandler
public void registerSessionHandler(ISessionHandler handler, ExecutorService executorService)
Receive session messages continuously from the queue. Registers a message handler and begins a new thread to receive session-messages. ISessionHandler methods are executed on the passed executor service.
Parameters:
Throws:
removeRule
public void removeRule(String ruleName)
Removes the rule on the subscription identified by ruleName
Parameters:
Throws:
removeRuleAsync
public CompletableFuture
Asynchronously removes the rule on the subscription identified by ruleName
Parameters:
setPrefetchCount
public void setPrefetchCount(int prefetchCount)
Set the prefetch count of the receiver. Prefetch speeds up the message flow by aiming to have a message readily available for local retrieval when and before the application asks for one using Receive. Setting a non-zero value prefetches PrefetchCount number of messages. Setting the value to zero turns prefetch off. For RECEIVEANDDELETE mode, the default value is 0. For PEEKLOCK mode, the default value is 100.
The value cannot be set until the receiver is created.
Parameters:
Throws:
Applies to
Azure SDK for Java