You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/service-bus-messaging/entity-suspend.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,25 +2,25 @@
2
2
title: Azure Service Bus - suspend messaging entities
3
3
description: This article explains how to temporarily suspend and reactivate Azure Service Bus message entities (queues, topics, and subscriptions).
4
4
ms.topic: article
5
-
ms.date: 09/28/2021
5
+
ms.date: 09/06/2022
6
6
ms.custom: devx-track-azurepowershell
7
7
---
8
8
9
9
# Suspend and reactivate messaging entities (disable)
10
10
11
-
Queues, topics, and subscriptions can be temporarily suspended. Suspension puts the entity into a disabled state in which all messages are maintained in storage. However, messages cannot be removed or added, and the respective protocol operations yield errors.
11
+
Queues, topics, and subscriptions can be temporarily suspended. Suspension puts the entity into a disabled state in which all messages are maintained in storage. However, messages can't be removed or added, and the respective protocol operations yield errors.
12
12
13
13
You may want to suspend an entity for urgent administrative reasons. For example, a faulty receiver takes messages off the queue, fails processing, and yet incorrectly completes the messages and removes them. In this case, you may want to disable the queue for receives until you correct and deploy the code.
14
14
15
-
A suspension or reactivation can be performed either by the user or by the system. The system only suspends entities because of grave administrative reasons such as hitting the subscription spending limit. System-disabled entities cannot be reactivated by the user, but are restored when the cause of the suspension has been addressed.
15
+
A suspension or reactivation can be performed either by the user or by the system. The system only suspends entities because of grave administrative reasons such as hitting the subscription spending limit. System-disabled entities can't be reactivated by the user, but are restored when the cause of the suspension has been addressed.
16
16
17
17
## Queue status
18
18
The states that can be set for a **queue** are:
19
19
20
20
-**Active**: The queue is active. You can send messages to and receive messages from the queue.
21
21
-**Disabled**: The queue is suspended. It's equivalent to setting both **SendDisabled** and **ReceiveDisabled**.
22
22
-**SendDisabled**: You can't send messages to the queue, but you can receive messages from it. You'll get an exception if you try to send messages to the queue.
23
-
-**ReceiveDisabled**: You can send messages to the queue, but you can't receive messages from it. You'll get an exception if you try to receive messages to the queue.
23
+
-**ReceiveDisabled**: You can send messages to the queue, but you can't receive messages from it. You'll get an exception if you try to receive messages from the queue.
24
24
25
25
26
26
### Change the queue status in the Azure portal:
@@ -34,7 +34,7 @@ The states that can be set for a **queue** are:
34
34
35
35
:::image type="content" source="./media/entity-suspend/entity-state-change.png" alt-text="Set state of the queue":::
36
36
37
-
You can also disable the send and receive operations using the Service Bus [NamespaceManager](/dotnet/api/microsoft.servicebus.namespacemanager) APIs in the .NET SDK, or using an Azure Resource Manager template through Azure CLI or Azure PowerShell.
37
+
You can also disable the send and receive operations using an Azure Resource Manager template through Azure CLI or Azure PowerShell.
38
38
39
39
### Change the queue status using Azure PowerShell
40
40
The PowerShell command to disable a queue is shown in the following example. The reactivation command is equivalent, setting `Status` to **Active**.
@@ -54,7 +54,7 @@ You can change topic status in the Azure portal. Select the current status of th
54
54
55
55
The states that can be set for a **topic** are:
56
56
-**Active**: The topic is active. You can send messages to the topic.
57
-
-**Disabled**: The topic is suspended. You can't send messages to the topic.
57
+
-**Disabled**: The topic is suspended. You can't send messages to the topic. Setting **Disabled** is equivalent to setting **SendDisabled** for a topic.
58
58
-**SendDisabled**: Same effect as **Disabled**. You can't send messages to the topic. You'll get an exception if you try to send messages to the topic.
59
59
60
60
## Subscription status
@@ -64,8 +64,10 @@ You can change subscription status in the Azure portal. Select the current statu
64
64
65
65
The states that can be set for a **subscription** are:
66
66
-**Active**: The subscription is active. You can receive messages from the subscription.
67
-
-**Disabled**: The subscription is suspended. You can't receive messages from the subscription.
68
-
-**ReceiveDisabled**: Same effect as **Disabled**. You can't receive messages from the subscription. You'll get an exception if you try to receive messages to the subscription.
67
+
-**Disabled**: The subscription is suspended. You can't receive messages from the subscription. Setting **Disabled** on a subscription is equivalent to setting **ReceiveDisabled**. You'll get an exception if you try to receive messages from the subscription.
68
+
-**ReceiveDisabled**: Same effect as **Disabled**. You can't receive messages from the subscription. You'll get an exception if you try to receive messages from the subscription.
69
+
70
+
Here's how the behavior is based on the status you set on a topic and its subscription.
0 commit comments