다음을 통해 공유


ServiceBusAdministrationAsyncClient Class

  • java.lang.Object
    • com.azure.messaging.servicebus.administration.ServiceBusAdministrationAsyncClient

public final class ServiceBusAdministrationAsyncClient

An asynchronous client for managing a Service Bus namespace. Instantiated via ServiceBusAdministrationClientBuilder.

Sample: Create the async client

The follow code sample demonstrates the creation of the async administration client. The credential used in the following sample is DefaultAzureCredential for authentication. It is appropriate for most scenarios, including local development and production environments. Additionally, we recommend using managed identity for authentication in production environments. You can find more information on different ways of authenticating and their corresponding credential types in the Azure Identity documentation.

// DefaultAzureCredential creates a credential based on the environment it is executed in.
 TokenCredential credential = new DefaultAzureCredentialBuilder().build();

 // 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net"
 ServiceBusAdministrationAsyncClient client = new ServiceBusAdministrationClientBuilder()
     .credential(fullyQualifiedNamespace, new DefaultAzureCredentialBuilder().build())
     .buildAsyncClient();

Sample: Create a queue

The following sample creates a queue with default values. Default values are listed in CreateQueueOptions().

// `.subscribe()` is a non-blocking call. It'll move onto the next
 // instruction after setting up the `consumer` and `errorConsumer` callbacks.
 client.createQueue("my-new-queue").subscribe(queue -> {
     System.out.printf("Queue created. Name: %s. Lock Duration: %s.%n",
         queue.getName(), queue.getLockDuration());
 }, error -> {
         System.err.println("Error creating queue: " + error);
     });

Sample: Edit an existing subscription

The following code sample demonstrates updating an existing subscription. Users should fetch the subscription's properties, modify the properties, and then pass the object to update method.

// To update the subscription we have to:
 // 1. Get the subscription info from the service.
 // 2. Update the SubscriptionProperties we want to change.
 // 3. Call the updateSubscription() with the updated object.

 // `.subscribe()` is a non-blocking call. It'll move onto the next
 // instruction after setting up the `consumer` and `errorConsumer` callbacks.
 client.getSubscription("my-topic", "my-subscription")
     .flatMap(subscription -> {
         System.out.println("Original delivery count: " + subscription.getMaxDeliveryCount());

         // Updating it to a new value.
         subscription.setMaxDeliveryCount(5);

         // Persisting the updates to the subscription object.
         return client.updateSubscription(subscription);
     })
     .subscribe(subscription -> {
         System.out.printf("Subscription updated. Name: %s. Delivery count: %s.%n",
             subscription.getSubscriptionName(), subscription.getMaxDeliveryCount());
     }, error -> {
             System.err.println("Error updating subscription: " + error);
         });

Sample: List all queues

The code sample below lists all the queues in the Service Bus namespace.

// `.subscribe()` is a non-blocking call. It'll move onto the next
 // instruction after setting up the `consumer` and `errorConsumer` callbacks.
 client.listQueues().subscribe(queue -> {
     System.out.printf("Queue [%s]. Lock Duration: %s.%n",
         queue.getName(), queue.getLockDuration());
 }, error -> {
         System.err.println("Error fetching queues: " + error);
     });

Sample: Delete queue

The code sample below demonstrates deleting an existing queue.

// `.subscribe()` is a non-blocking call. It'll move onto the next
 // instruction after setting up the `consumer`, `errorConsumer`, `completeConsumer` callbacks.
 asyncClient.deleteQueue("my-existing-queue").subscribe(unused -> {
 }, error -> {
     System.err.println("Error deleting queue: " + error);
 }, () -> {
     System.out.println("Deleted queue.");
 });

Method Summary

Modifier and Type Method and Description
Mono<QueueProperties> createQueue(String queueName)

Creates a queue with the given name.

Mono<QueueProperties> createQueue(String queueName, CreateQueueOptions queueOptions)

Creates a queue with the CreateQueueOptions and given queue name.

Mono<Response<QueueProperties>> createQueueWithResponse(String queueName, CreateQueueOptions queueOptions)

Creates a queue and returns the created queue in addition to the HTTP response.

Mono<RuleProperties> createRule(String topicName, String subscriptionName, String ruleName)

Creates a rule under the given topic and subscription

Mono<RuleProperties> createRule(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions)

Creates a rule with the CreateRuleOptions.

Mono<Response<RuleProperties>> createRuleWithResponse(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions)

Creates a rule and returns the created rule in addition to the HTTP response.

Mono<SubscriptionProperties> createSubscription(String topicName, String subscriptionName)

Creates a subscription with the given topic and subscription names.

Mono<SubscriptionProperties> createSubscription(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions)

Creates a subscription with the CreateSubscriptionOptions.

Mono<SubscriptionProperties> createSubscription(String topicName, String subscriptionName, String ruleName, CreateSubscriptionOptions subscriptionOptions, CreateRuleOptions ruleOptions)

Creates a subscription with a default rule using CreateSubscriptionOptions and CreateRuleOptions.

Mono<Response<SubscriptionProperties>> createSubscriptionWithResponse(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions)

Creates a subscription and returns the created subscription in addition to the HTTP response.

Mono<Response<SubscriptionProperties>> createSubscriptionWithResponse(String topicName, String subscriptionName, String ruleName, CreateSubscriptionOptions subscriptionOptions, CreateRuleOptions ruleOptions)

Creates a subscription with default rule and returns the created subscription in addition to the HTTP response.

Mono<TopicProperties> createTopic(String topicName)

Creates a topic with the given name.

Mono<TopicProperties> createTopic(String topicName, CreateTopicOptions topicOptions)

Creates a topic with the CreateTopicOptions.

Mono<Response<TopicProperties>> createTopicWithResponse(String topicName, CreateTopicOptions topicOptions)

Creates a topic and returns the created topic in addition to the HTTP response.

Mono<Void> deleteQueue(String queueName)

Deletes a queue the matching queueName.

Mono<Response<Void>> deleteQueueWithResponse(String queueName)

Deletes a queue the matching queueName and returns the HTTP response.

Mono<Void> deleteRule(String topicName, String subscriptionName, String ruleName)

Deletes a rule the matching ruleName.

Mono<Response<Void>> deleteRuleWithResponse(String topicName, String subscriptionName, String ruleName)

Deletes a rule the matching ruleName and returns the HTTP response.

Mono<Void> deleteSubscription(String topicName, String subscriptionName)

Deletes a subscription the matching subscriptionName.

Mono<Response<Void>> deleteSubscriptionWithResponse(String topicName, String subscriptionName)

Deletes a subscription the matching subscriptionName and returns the HTTP response.

Mono<Void> deleteTopic(String topicName)

Deletes a topic the matching topicName.

Mono<Response<Void>> deleteTopicWithResponse(String topicName)

Deletes a topic the matching topicName and returns the HTTP response.

Mono<NamespaceProperties> getNamespaceProperties()

Gets information about the Service Bus namespace.

Mono<Response<NamespaceProperties>> getNamespacePropertiesWithResponse()

Gets information about the Service Bus namespace along with its HTTP response.

Mono<QueueProperties> getQueue(String queueName)

Gets information about the queue.

Mono<Boolean> getQueueExists(String queueName)

Gets whether or not a queue with queueName exists in the Service Bus namespace.

Mono<Response<Boolean>> getQueueExistsWithResponse(String queueName)

Gets whether or not a queue with queueName exists in the Service Bus namespace.

Mono<QueueRuntimeProperties> getQueueRuntimeProperties(String queueName)

Gets runtime properties about the queue.

Mono<Response<QueueRuntimeProperties>> getQueueRuntimePropertiesWithResponse(String queueName)

Gets runtime properties about the queue along with its HTTP response.

Mono<Response<QueueProperties>> getQueueWithResponse(String queueName)

Gets information about the queue along with its HTTP response.

Mono<RuleProperties> getRule(String topicName, String subscriptionName, String ruleName)

Gets a rule from the service namespace.

Mono<Response<RuleProperties>> getRuleWithResponse(String topicName, String subscriptionName, String ruleName)

Gets a rule from the service namespace.

Mono<SubscriptionProperties> getSubscription(String topicName, String subscriptionName)

Gets information about the queue.

Mono<Boolean> getSubscriptionExists(String topicName, String subscriptionName)

Gets whether or not a subscription within a topic exists.

Mono<Response<Boolean>> getSubscriptionExistsWithResponse(String topicName, String subscriptionName)

Gets whether or not a subscription within a topic exists.

Mono<SubscriptionRuntimeProperties> getSubscriptionRuntimeProperties(String topicName, String subscriptionName)

Gets runtime properties about the subscription.

Mono<Response<SubscriptionRuntimeProperties>> getSubscriptionRuntimePropertiesWithResponse(String topicName, String subscriptionName)

Gets runtime properties about the subscription.

Mono<Response<SubscriptionProperties>> getSubscriptionWithResponse(String topicName, String subscriptionName)

Gets information about the subscription along with its HTTP response.

Mono<TopicProperties> getTopic(String topicName)

Gets information about the topic.

Mono<Boolean> getTopicExists(String topicName)

Gets whether or not a topic with topicName exists in the Service Bus namespace.

Mono<Response<Boolean>> getTopicExistsWithResponse(String topicName)

Gets whether or not a topic with topicName exists in the Service Bus namespace.

Mono<TopicRuntimeProperties> getTopicRuntimeProperties(String topicName)

Gets runtime properties about the topic.

Mono<Response<TopicRuntimeProperties>> getTopicRuntimePropertiesWithResponse(String topicName)

Gets runtime properties about the topic with its HTTP response.

Mono<Response<TopicProperties>> getTopicWithResponse(String topicName)

Gets information about the topic along with its HTTP response.

PagedFlux<QueueProperties> listQueues()

Fetches all the queues in the Service Bus namespace.

PagedFlux<RuleProperties> listRules(String topicName, String subscriptionName)

Fetches all the rules for a topic and subscription.

PagedFlux<SubscriptionProperties> listSubscriptions(String topicName)

Fetches all the subscriptions for a topic.

PagedFlux<TopicProperties> listTopics()

Fetches all the topics in the Service Bus namespace.

Mono<QueueProperties> updateQueue(QueueProperties queue)

Updates a queue with the given QueueProperties.

Mono<Response<QueueProperties>> updateQueueWithResponse(QueueProperties queue)

Updates a queue with the given QueueProperties.

Mono<RuleProperties> updateRule(String topicName, String subscriptionName, RuleProperties rule)

Updates a rule with the given RuleProperties.

Mono<Response<RuleProperties>> updateRuleWithResponse(String topicName, String subscriptionName, RuleProperties rule)

Updates a rule with the given RuleProperties.

Mono<SubscriptionProperties> updateSubscription(SubscriptionProperties subscription)

Updates a subscription with the given SubscriptionProperties.

Mono<Response<SubscriptionProperties>> updateSubscriptionWithResponse(SubscriptionProperties subscription)

Updates a subscription with the given SubscriptionProperties.

Mono<TopicProperties> updateTopic(TopicProperties topic)

Updates a topic with the given TopicProperties.

Mono<Response<TopicProperties>> updateTopicWithResponse(TopicProperties topic)

Updates a topic with the given TopicProperties.

Methods inherited from java.lang.Object

Method Details

createQueue

public Mono createQueue(String queueName)

Creates a queue with the given name.

Parameters:

queueName - Name of the queue to create.

Returns:

A Mono that completes with information about the created queue.

createQueue

public Mono createQueue(String queueName, CreateQueueOptions queueOptions)

Creates a queue with the CreateQueueOptions and given queue name.

Parameters:

queueName - Name of the queue to create.
queueOptions - Options about the queue to create.

Returns:

A Mono that completes with information about the created queue.

createQueueWithResponse

public Mono> createQueueWithResponse(String queueName, CreateQueueOptions queueOptions)

Creates a queue and returns the created queue in addition to the HTTP response.

Parameters:

queueName - Name of the queue to create.
queueOptions - Options about the queue to create.

Returns:

A Mono that returns the created queue in addition to the HTTP response.

createRule

public Mono createRule(String topicName, String subscriptionName, String ruleName)

Creates a rule under the given topic and subscription

Parameters:

topicName - Name of the topic associated with rule.
subscriptionName - Name of the subscription associated with the rule.
ruleName - Name of the rule.

Returns:

A Mono that completes with information about the created rule.

createRule

public Mono createRule(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions)

Creates a rule with the CreateRuleOptions.

Parameters:

topicName - Name of the topic associated with rule.
subscriptionName - Name of the subscription associated with the rule.
ruleName - Name of the rule.
ruleOptions - Information about the rule to create.

Returns:

A Mono that completes with information about the created rule.

createRuleWithResponse

public Mono> createRuleWithResponse(String topicName, String subscriptionName, String ruleName, CreateRuleOptions ruleOptions)

Creates a rule and returns the created rule in addition to the HTTP response.

Parameters:

topicName - Name of the topic associated with rule.
subscriptionName - Name of the subscription associated with the rule.
ruleName - Name of the rule.
ruleOptions - Information about the rule to create.

Returns:

A Mono that returns the created rule in addition to the HTTP response.

createSubscription

public Mono createSubscription(String topicName, String subscriptionName)

Creates a subscription with the given topic and subscription names.

Parameters:

topicName - Name of the topic associated with subscription.
subscriptionName - Name of the subscription.

Returns:

A Mono that completes with information about the created subscription.

createSubscription

public Mono createSubscription(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions)

Creates a subscription with the CreateSubscriptionOptions.

Parameters:

topicName - Name of the topic associated with subscription.
subscriptionName - Name of the subscription.
subscriptionOptions - Information about the subscription to create.

Returns:

A Mono that completes with information about the created subscription.

createSubscription

public Mono createSubscription(String topicName, String subscriptionName, String ruleName, CreateSubscriptionOptions subscriptionOptions, CreateRuleOptions ruleOptions)

Creates a subscription with a default rule using CreateSubscriptionOptions and CreateRuleOptions.

Parameters:

topicName - Name of the topic associated with subscription.
subscriptionName - Name of the subscription.
ruleName - Name of the default rule the subscription should be created with.
subscriptionOptions - A CreateSubscriptionOptions object describing the subscription to create.
ruleOptions - A CreateRuleOptions object describing the default rule. If null, then pass-through filter will be created.

Returns:

A Mono that completes with information about the created subscription.

createSubscriptionWithResponse

public Mono> createSubscriptionWithResponse(String topicName, String subscriptionName, CreateSubscriptionOptions subscriptionOptions)

Creates a subscription and returns the created subscription in addition to the HTTP response.

Parameters:

topicName - Name of the topic associated with subscription.
subscriptionName - Name of the subscription.
subscriptionOptions - Information about the subscription to create.

Returns:

A Mono that returns the created subscription in addition to the HTTP response.

createSubscriptionWithResponse

public Mono> createSubscriptionWithResponse(String topicName, String subscriptionName, String ruleName, CreateSubscriptionOptions subscriptionOptions, CreateRuleOptions ruleOptions)

Creates a subscription with default rule and returns the created subscription in addition to the HTTP response.

Parameters:

topicName - Name of the topic associated with subscription.
subscriptionName - Name of the subscription.
ruleName - Name of the default rule the subscription should be created with.
subscriptionOptions - A CreateSubscriptionOptions object describing the subscription to create.
ruleOptions - A CreateRuleOptions object describing the default rule. If null, then pass-through filter will be created.

Returns:

A Mono that returns the created subscription in addition to the HTTP response.

createTopic

public Mono createTopic(String topicName)

Creates a topic with the given name.

Parameters:

topicName - Name of the topic to create.

Returns:

A Mono that completes with information about the created topic.

createTopic

public Mono createTopic(String topicName, CreateTopicOptions topicOptions)

Creates a topic with the CreateTopicOptions.

Parameters:

topicName - Name of the topic to create.
topicOptions - The options used to create the topic.

Returns:

A Mono that completes with information about the created topic.

createTopicWithResponse

public Mono> createTopicWithResponse(String topicName, CreateTopicOptions topicOptions)

Creates a topic and returns the created topic in addition to the HTTP response.

Parameters:

topicName - Name of the topic to create.
topicOptions - The options used to create the topic.

Returns:

A Mono that returns the created topic in addition to the HTTP response.

deleteQueue

public Mono deleteQueue(String queueName)

Deletes a queue the matching queueName.

Parameters:

queueName - Name of queue to delete.

Returns:

A Mono that completes when the queue is deleted.

deleteQueueWithResponse

public Mono> deleteQueueWithResponse(String queueName)

Deletes a queue the matching queueName and returns the HTTP response.

Parameters:

queueName - Name of queue to delete.

Returns:

A Mono that completes when the queue is deleted and returns the HTTP response.

deleteRule

public Mono deleteRule(String topicName, String subscriptionName, String ruleName)

Deletes a rule the matching ruleName.

Parameters:

topicName - Name of topic associated with rule to delete.
subscriptionName - Name of the subscription associated with the rule to delete.
ruleName - Name of rule to delete.

Returns:

A Mono that completes when the rule is deleted.

deleteRuleWithResponse

public Mono> deleteRuleWithResponse(String topicName, String subscriptionName, String ruleName)

Deletes a rule the matching ruleName and returns the HTTP response.

Parameters:

topicName - Name of topic associated with rule to delete.
subscriptionName - Name of the subscription associated with the rule to delete.
ruleName - Name of rule to delete.

Returns:

A Mono that completes when the rule is deleted and returns the HTTP response.

deleteSubscription

public Mono deleteSubscription(String topicName, String subscriptionName)

Deletes a subscription the matching subscriptionName.

Parameters:

topicName - Name of topic associated with subscription to delete.
subscriptionName - Name of subscription to delete.

Returns:

A Mono that completes when the subscription is deleted.

deleteSubscriptionWithResponse

public Mono> deleteSubscriptionWithResponse(String topicName, String subscriptionName)

Deletes a subscription the matching subscriptionName and returns the HTTP response.

Parameters:

topicName - Name of topic associated with subscription to delete.
subscriptionName - Name of subscription to delete.

Returns:

A Mono that completes when the subscription is deleted and returns the HTTP response.

deleteTopic

public Mono deleteTopic(String topicName)

Deletes a topic the matching topicName.

Parameters:

topicName - Name of topic to delete.

Returns:

A Mono that completes when the topic is deleted.

deleteTopicWithResponse

public Mono> deleteTopicWithResponse(String topicName)

Deletes a topic the matching topicName and returns the HTTP response.

Parameters:

topicName - Name of topic to delete.

Returns:

A Mono that completes when the topic is deleted and returns the HTTP response.

getNamespaceProperties

public Mono getNamespaceProperties()

Gets information about the Service Bus namespace.

Returns:

A Mono that completes with information about the Service Bus namespace.

getNamespacePropertiesWithResponse

public Mono> getNamespacePropertiesWithResponse()

Gets information about the Service Bus namespace along with its HTTP response.

Returns:

A Mono that completes with information about the namespace and the associated HTTP response.

getQueue

public Mono getQueue(String queueName)

Gets information about the queue.

Parameters:

queueName - Name of queue to get information about.

Returns:

A Mono that completes with information about the queue.

getQueueExists

public Mono getQueueExists(String queueName)

Gets whether or not a queue with queueName exists in the Service Bus namespace.

Parameters:

queueName - Name of the queue.

Returns:

A Mono that completes indicating whether the queue exists.

getQueueExistsWithResponse

public Mono> getQueueExistsWithResponse(String queueName)

Gets whether or not a queue with queueName exists in the Service Bus namespace.

Parameters:

queueName - Name of the queue.

Returns:

A Mono that completes indicating whether or not the queue exists along with its HTTP response.

getQueueRuntimeProperties

public Mono getQueueRuntimeProperties(String queueName)

Gets runtime properties about the queue.

Parameters:

queueName - Name of queue to get information about.

Returns:

A Mono that completes with runtime properties about the queue.

getQueueRuntimePropertiesWithResponse

public Mono> getQueueRuntimePropertiesWithResponse(String queueName)

Gets runtime properties about the queue along with its HTTP response.

Parameters:

queueName - Name of queue to get information about.

Returns:

A Mono that completes with runtime properties about the queue and the associated HTTP response.

getQueueWithResponse

public Mono> getQueueWithResponse(String queueName)

Gets information about the queue along with its HTTP response.

Parameters:

queueName - Name of queue to get information about.

Returns:

A Mono that completes with information about the queue and the associated HTTP response.

getRule

public Mono getRule(String topicName, String subscriptionName, String ruleName)

Gets a rule from the service namespace. Only following data types are deserialized in Filters and Action parameters - string, int, long, boolean, double, and OffsetDateTime. Other data types would return its string value.

Parameters:

topicName - The name of the topic relative to service bus namespace.
subscriptionName - The subscription name the rule belongs to.
ruleName - The name of the rule to retrieve.

Returns:

The associated rule.

getRuleWithResponse

public Mono> getRuleWithResponse(String topicName, String subscriptionName, String ruleName)

Gets a rule from the service namespace. Only following data types are deserialized in Filters and Action parameters - string, int, long, bool, double, and OffsetDateTime. Other data types would return its string value.

Parameters:

topicName - The name of the topic relative to service bus namespace.
subscriptionName - The subscription name the rule belongs to.
ruleName - The name of the rule to retrieve.

Returns:

The associated rule with the corresponding HTTP response.

getSubscription

public Mono getSubscription(String topicName, String subscriptionName)

Gets information about the queue.

Parameters:

topicName - Name of topic associated with subscription.
subscriptionName - Name of subscription to get information about.

Returns:

A Mono that completes with information about the subscription.

getSubscriptionExists

public Mono getSubscriptionExists(String topicName, String subscriptionName)

Gets whether or not a subscription within a topic exists.

Parameters:

topicName - Name of topic associated with subscription.
subscriptionName - Name of the subscription.

Returns:

A Mono that completes indicating whether or not the subscription exists.

getSubscriptionExistsWithResponse

public Mono> getSubscriptionExistsWithResponse(String topicName, String subscriptionName)

Gets whether or not a subscription within a topic exists.

Parameters:

topicName - Name of topic associated with subscription.
subscriptionName - Name of the subscription.

Returns:

A Mono that completes indicating whether the subscription exists along with its HTTP response.

getSubscriptionRuntimeProperties

public Mono getSubscriptionRuntimeProperties(String topicName, String subscriptionName)

Gets runtime properties about the subscription.

Parameters:

topicName - Name of topic associated with subscription.
subscriptionName - Name of subscription to get information about.

Returns:

A Mono that completes with runtime properties about the subscription.

getSubscriptionRuntimePropertiesWithResponse

public Mono> getSubscriptionRuntimePropertiesWithResponse(String topicName, String subscriptionName)

Gets runtime properties about the subscription.

Parameters:

topicName - Name of topic associated with subscription.
subscriptionName - Name of subscription to get information about.

Returns:

A Mono that completes with runtime properties about the subscription.

getSubscriptionWithResponse

public Mono> getSubscriptionWithResponse(String topicName, String subscriptionName)

Gets information about the subscription along with its HTTP response.

Parameters:

topicName - Name of topic associated with subscription.
subscriptionName - Name of subscription to get information about.

Returns:

A Mono that completes with information about the subscription and the associated HTTP response.

getTopic

public Mono getTopic(String topicName)

Gets information about the topic.

Parameters:

topicName - Name of topic to get information about.

Returns:

A Mono that completes with information about the topic.

getTopicExists

public Mono getTopicExists(String topicName)

Gets whether or not a topic with topicName exists in the Service Bus namespace.

Parameters:

topicName - Name of the topic.

Returns:

A Mono that completes indicating whether or not the topic exists.

getTopicExistsWithResponse

public Mono> getTopicExistsWithResponse(String topicName)

Gets whether or not a topic with topicName exists in the Service Bus namespace.

Parameters:

topicName - Name of the topic.

Returns:

A Mono that completes indicating whether the topic exists along with its HTTP response.

getTopicRuntimeProperties

public Mono getTopicRuntimeProperties(String topicName)

Gets runtime properties about the topic.

Parameters:

topicName - Name of topic to get information about.

Returns:

A Mono that completes with runtime properties about the topic.

getTopicRuntimePropertiesWithResponse

public Mono> getTopicRuntimePropertiesWithResponse(String topicName)

Gets runtime properties about the topic with its HTTP response.

Parameters:

topicName - Name of topic to get information about.

Returns:

A Mono that completes with runtime properties about the topic and the associated HTTP response.

getTopicWithResponse

public Mono> getTopicWithResponse(String topicName)

Gets information about the topic along with its HTTP response.

Parameters:

topicName - Name of topic to get information about.

Returns:

A Mono that completes with information about the topic and the associated HTTP response.

listQueues

public PagedFlux listQueues()

Fetches all the queues in the Service Bus namespace.

Returns:

A Flux of QueueProperties in the Service Bus namespace.

listRules

public PagedFlux listRules(String topicName, String subscriptionName)

Fetches all the rules for a topic and subscription.

Parameters:

topicName - The topic name under which all the rules need to be retrieved.
subscriptionName - The name of the subscription for which all rules need to be retrieved.

Returns:

A Flux of RuleProperties for the topicName and subscriptionName.

listSubscriptions

public PagedFlux listSubscriptions(String topicName)

Fetches all the subscriptions for a topic.

Parameters:

topicName - The topic name under which all the subscriptions need to be retrieved.

Returns:

A Flux of SubscriptionProperties for the topicName.

listTopics

public PagedFlux listTopics()

Fetches all the topics in the Service Bus namespace.

Returns:

A Flux of TopicProperties in the Service Bus namespace.

updateQueue

public Mono updateQueue(QueueProperties queue)

Updates a queue with the given QueueProperties. The QueueProperties must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getQueue(String queueName)
  2. Update the required elements.
  3. Pass the updated description into this method.

There are a subset of properties that can be updated. More information can be found in the links below. They are:

Parameters:

queue - Information about the queue to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that completes with the updated queue.

updateQueueWithResponse

public Mono> updateQueueWithResponse(QueueProperties queue)

Updates a queue with the given QueueProperties. The QueueProperties must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getQueue(String queueName)
  2. Update the required elements.
  3. Pass the updated description into this method.

There are a subset of properties that can be updated. More information can be found in the links below. They are:

Parameters:

queue - Information about the queue to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that returns the updated queue in addition to the HTTP response.

updateRule

public Mono updateRule(String topicName, String subscriptionName, RuleProperties rule)

Updates a rule with the given RuleProperties. The RuleProperties must be fully populated as all the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getRule(String topicName, String subscriptionName, String ruleName)
  2. Update the required elements.
  3. Pass the updated description into this method.

Parameters:

topicName - The topic name under which the rule is updated.
subscriptionName - The name of the subscription for which the rule is updated.
rule - Information about the rule to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that returns the updated rule.

updateRuleWithResponse

public Mono> updateRuleWithResponse(String topicName, String subscriptionName, RuleProperties rule)

Updates a rule with the given RuleProperties. The RuleProperties must be fully populated as all the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getRule(String topicName, String subscriptionName, String ruleName)
  2. Update the required elements.
  3. Pass the updated description into this method.

Parameters:

topicName - The topic name under which the rule is updated.
subscriptionName - The name of the subscription for which the rule is updated.
rule - Information about the rule to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that returns the updated rule in addition to the HTTP response.

updateSubscription

public Mono updateSubscription(SubscriptionProperties subscription)

Updates a subscription with the given SubscriptionProperties. The SubscriptionProperties must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getSubscription(String topicName, String subscriptionName)
  2. Update the required elements.
  3. Pass the updated description into this method.

There are a subset of properties that can be updated. More information can be found in the links below. They are:

Parameters:

subscription - Information about the subscription to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that returns the updated subscription.

updateSubscriptionWithResponse

public Mono> updateSubscriptionWithResponse(SubscriptionProperties subscription)

Updates a subscription with the given SubscriptionProperties. The SubscriptionProperties must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getSubscription(String topicName, String subscriptionName)
  2. Update the required elements.
  3. Pass the updated description into this method.

There are a subset of properties that can be updated. More information can be found in the links below. They are:

Parameters:

subscription - Information about the subscription to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that returns the updated subscription in addition to the HTTP response.

updateTopic

public Mono updateTopic(TopicProperties topic)

Updates a topic with the given TopicProperties. The TopicProperties must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getTopic(String topicName)
  2. Update the required elements.
  3. Pass the updated description into this method.

There are a subset of properties that can be updated. More information can be found in the links below. They are:

Parameters:

topic - Information about the topic to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that completes with the updated topic.

updateTopicWithResponse

public Mono> updateTopicWithResponse(TopicProperties topic)

Updates a topic with the given TopicProperties. The TopicProperties must be fully populated as all of the properties are replaced. If a property is not set the service default value is used. The suggested flow is:

  1. getTopic(String topicName)
  2. Update the required elements.
  3. Pass the updated description into this method.

There are a subset of properties that can be updated. More information can be found in the links below. They are:

Parameters:

topic - Information about the topic to update. You must provide all the property values that are desired on the updated entity. Any values not provided are set to the service default values.

Returns:

A Mono that completes with the updated topic and its HTTP response.

Applies to