MessagingFactory Class
Represents a messaging factory. This is the anchor class used for run-time operations to send and receive to and from queues, topics, or subscriptions.
System.Object
Microsoft.ServiceBus.Messaging.MessageClientEntity
Microsoft.ServiceBus.Messaging.MessagingFactory
Microsoft.ServiceBus.Messaging.MessageClientEntity
Microsoft.ServiceBus.Messaging.MessagingFactory
Namespace: Microsoft.ServiceBus.Messaging
Assembly: Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)
The MessagingFactory type exposes the following members.
| Name | Description | |
|---|---|---|
|
Address | Gets the base address of the messaging factory. |
|
IsClosed | Gets or sets a value that indicates whether the message client entity is closed. (Inherited from MessageClientEntity.) |
| Name | Description | |
|---|---|---|
|
Abort | Aborts the message client entity and puts its status into a closing state. (Inherited from MessageClientEntity.) |
|
BeginClose | Begins an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.) |
|
BeginCreate(String, MessagingFactorySettings, AsyncCallback, Object) | Begins an asynchronous request to create a MessagingFactory object. |
|
BeginCreate(String, TokenProvider, AsyncCallback, Object) | Begins an asynchronous request to create a MessagingFactory object. |
|
BeginCreate(Uri, MessagingFactorySettings, AsyncCallback, Object) | Begins an asynchronous request to create a MessagingFactory object. |
|
BeginCreate(Uri, TokenProvider, AsyncCallback, Object) | Begins an asynchronous request to create a MessagingFactory object. |
|
BeginCreateMessageReceiver(String, AsyncCallback, Object) | Begins a create message receiver. |
|
BeginCreateMessageReceiver(String, ReceiveMode, AsyncCallback, Object) | Begins a create message receiver. |
|
BeginCreateMessageSender | Begins a create message sender. |
|
Close | Closes the message client entity and puts its status into a closed state. (Inherited from MessageClientEntity.) |
|
Create(String, MessagingFactorySettings) | Creates a new MessagingFactory object. |
|
Create(String, TokenProvider) | Creates a new MessagingFactory object. |
|
Create(Uri, MessagingFactorySettings) | Creates a new MessagingFactory object. |
|
Create(Uri, TokenProvider) | Creates a new MessagingFactory object. |
|
CreateMessageReceiver(String) | Creates a message receiver. |
|
CreateMessageReceiver(String, ReceiveMode) | Creates a message receiver. |
|
CreateMessageSender | Creates a message sender. |
|
CreateQueueClient(String) | Creates a new queue client. |
|
CreateQueueClient(String, ReceiveMode) | Creates a new queue client. |
|
CreateSubscriptionClient(String, String) | Creates a subscription client. |
|
CreateSubscriptionClient(String, String, ReceiveMode) | Creates a new subscription client. |
|
CreateTopicClient | Creates a new topic client. |
|
EndClose | Finishes an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.) |
|
EndCreate | Ends an asynchronous request to create a MessagingFactory object. |
|
EndCreateMessageReceiver | Ends a create message receiver. |
|
EndCreateMessageSender | Ends a create message sender. |
|
Equals | (Inherited from Object.) |
|
Fault | Puts the message client entity into a faulted state. (Inherited from MessageClientEntity.) |
|
Finalize | (Inherited from Object.) |
|
GetHashCode | (Inherited from Object.) |
|
GetSettings | Retrieves a copy of the settings of the messaging factory. |
|
GetType | (Inherited from Object.) |
|
MemberwiseClone | (Inherited from Object.) |
|
OnAbort | Executes the abort action. (Overrides MessageClientEntity.OnAbort.) |
|
OnAcceptSessionReceiver | Executes the accept session receiver action. |
|
OnBeginAcceptSessionReceiver | Executes the begin accept session receiver action. |
|
OnBeginClose | Executes the begin close action. (Overrides MessageClientEntity.OnBeginClose(TimeSpan, AsyncCallback, Object).) |
|
OnBeginCreateMessageReceiver | Executes the begin create message receiver action. |
|
OnBeginCreateMessageSender | Executes the begin create message sender action. |
|
OnBeginOpen | Executes upon calling the operation to begin to open the message client entity. (Inherited from MessageClientEntity.) |
|
OnClose | Executes the close action. (Overrides MessageClientEntity.OnClose(TimeSpan).) |
|
OnClosed | Occurs when the message client entity is transitioned into a closing state. (Inherited from MessageClientEntity.) |
|
OnCreateMessageReceiver | Executes the create message receiver action. |
|
OnCreateMessageSender | Executes the create message sender action. |
|
OnCreateQueueClient | Executes the create queue client action. |
|
OnCreateSubscriptionClient | Executes a create subscription client action. |
|
OnCreateTopicClient | Executes the create topic client action. |
|
OnEndAcceptSessionReceiver | Executes the end accept session receiver action. |
|
OnEndClose | Executes the end close action. (Overrides MessageClientEntity.OnEndClose(IAsyncResult).) |
|
OnEndCreateMessageReceiver | Executes the end create message receiver action. |
|
OnEndCreateMessageSender | Executes the end create message sender action. |
|
OnEndOpen | Executes upon calling the operation to end to open the message client entity. (Inherited from MessageClientEntity.) |
|
OnFaulted | Executes upon calling the Fault operation. (Inherited from MessageClientEntity.) |
|
OnOpen | Executes upon calling the operation to open the message client entity. (Inherited from MessageClientEntity.) |
|
OnOpened | Executes when the message client entity is opened. (Inherited from MessageClientEntity.) |
|
ThrowIfClosed | Throws an exception if the message client entity is closed. (Inherited from MessageClientEntity.) |
|
ThrowIfDisposed | Throws an exception if the message client entity is disposed. (Inherited from MessageClientEntity.) |
|
ThrowIfDisposedOrImmutable | Throws an exception if the client is disposed or immutable. (Inherited from MessageClientEntity.) |
|
ThrowIfDisposedOrNotOpen | Throws an exception if the client is disposed or not open. (Inherited from MessageClientEntity.) |
|
ThrowIfFaulted | Throws an exception if the client is faulted. (Inherited from MessageClientEntity.) |
|
ToString | (Inherited from Object.) |
Please note that any member method with CreateXXXClient, such as CreateQueueClient(String), does not create a new entity in the service namespace. It only retrieves a handle to an existing entity created earlier using the NamespaceManager object. If these entities do not exist in the service namespace, you will receive an exception.
string Address = "sb://myapp.WindowsAzure.com/"; //base address of namespace you are connecting to. MessagingFactorySettings MsgFactorySettings = new MessagingFactorySettings(); //specify operating timeout (optional) MessagingFactory MsgFactory = MessagingFactory.Create(Address, MsgFactorySettings);
