Export (0) Print
Expand All
Expand Minimize

EntityStatus Enumeration

Enumerates the possible values for the status of a messaging entity.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

[DataContractAttribute(Name = "EntityStatus", Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
public enum EntityStatus

Member nameDescription
ActiveThe status of the messaging entity is active.
CreatingIndicates that the resource is still being created. Any creation attempt on the same resource path will result in a MessagingException exception (HttpCode.Conflict 409).
DeletingIndicates that the system is still attempting cleanup of the entity. Any additional deletion call will be allowed (the system will be notified). Any additional creation call on the same resource path will result in a MessagingException exception (HttpCode.Conflict 409).
DisabledThe status of the messaging entity is disabled.
ReceiveDisabledThe receiving status of the messaging entity is disabled.

If you issue a receive or complete request to a queue or subscription that has a status of ReceiveDisabled, Service Bus returns a MessagingEntityDisabledException with the detailed message “Receiving from {queue|subscription} is disabled.”

RestoringResuming the previous status of the messaging entity.
SendDisabledThe sending status of the messaging entity is disabled.

If you send a message to a queue or topic that has a status of SendDisabled, Service Bus returns a MessagingEntityDisabledException exception with the detailed message “Sending to {queue|topic} is disabled.”

Set this value before a call to update the status of the messaging entity.

The behavior of a disabled entity is as follows:

  • You cannot send messages to a disabled queue or a disabled topic.

  • You cannot receive messages from a disabled queue, a disabled subscription, or a subscription to a disabled topic.

  • You cannot add or remove a rule of a disabled subscription or a subscription to a disabled topic.

  • You can create a new subscription with a custom filter if the topic is disabled.

  • If you send a message to an active topic, Service Bus copies the message into a disabled subscription.

  • Service Bus continues to send scheduled messages that are due if the topic is disabled.

  • Service Bus copies scheduled messages into a disabled subscription if the message is due.

  • Service Bus removes expired messages from a subscription if the topic or that subscription is disabled.

  • All management operations (Delete, GetQueue, etc.) are permitted on disabled entities.

QueueDescription qd = namespaceManager.GetQueue("myQ");
qd.Status = EntityStatus.Disabled;
namespaceManager.UpdateQueue(qd);
qd.Status = EntityStatus.Active;
namespaceManager.UpdateQueue(qd);

Community Additions

ADD
Show:
© 2014 Microsoft