MessageReceiver Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MessageReceiver(ServiceBusConnectionStringBuilder, ReceiveMode, RetryPolicy, Int32) |
Creates a new MessageReceiver from a ServiceBusConnectionStringBuilder. |
MessageReceiver(ServiceBusConnection, String, ReceiveMode, RetryPolicy, Int32) |
Creates a new AMQP MessageReceiver on a given ServiceBusConnection |
MessageReceiver(String, String, ReceiveMode, RetryPolicy, Int32) |
Creates a new MessageReceiver from a specified connection string and entity path. |
MessageReceiver(String, String, ITokenProvider, TransportType, ReceiveMode, RetryPolicy, Int32) |
Creates a new MessageReceiver from a specified endpoint, entity path, and token provider. |
MessageReceiver(ServiceBusConnectionStringBuilder, ReceiveMode, RetryPolicy, Int32)
- Source:
- MessageReceiver.cs
Creates a new MessageReceiver from a ServiceBusConnectionStringBuilder.
public MessageReceiver (Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder connectionStringBuilder, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.Core.MessageReceiver : Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.Core.MessageReceiver
Public Sub New (connectionStringBuilder As ServiceBusConnectionStringBuilder, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)
Parameters
- connectionStringBuilder
- ServiceBusConnectionStringBuilder
The ServiceBusConnectionStringBuilder having entity level connection details.
- receiveMode
- ReceiveMode
The ReceiveMode used to specify how messages are received. Defaults to PeekLock mode.
- retryPolicy
- RetryPolicy
The RetryPolicy that will be used when communicating with Service Bus. Defaults to Default.
- prefetchCount
- Int32
The PrefetchCount that specifies the upper limit of messages this receiver will actively receive regardless of whether a receive operation is pending. Defaults to 0.
Remarks
Creates a new connection to the entity, which is opened during the first operation.
Applies to
MessageReceiver(ServiceBusConnection, String, ReceiveMode, RetryPolicy, Int32)
- Source:
- MessageReceiver.cs
Creates a new AMQP MessageReceiver on a given ServiceBusConnection
public MessageReceiver (Microsoft.Azure.ServiceBus.ServiceBusConnection serviceBusConnection, string entityPath, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.Core.MessageReceiver : Microsoft.Azure.ServiceBus.ServiceBusConnection * string * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.Core.MessageReceiver
Public Sub New (serviceBusConnection As ServiceBusConnection, entityPath As String, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)
Parameters
- serviceBusConnection
- ServiceBusConnection
Connection object to the service bus namespace.
- entityPath
- String
The path of the entity for this receiver. For Queues this will be the name, but for Subscriptions this will be the path. You can use FormatSubscriptionPath(String, String), to help create this path.
- receiveMode
- ReceiveMode
The ReceiveMode used to specify how messages are received. Defaults to PeekLock mode.
- retryPolicy
- RetryPolicy
The RetryPolicy that will be used when communicating with Service Bus. Defaults to Default
- prefetchCount
- Int32
The PrefetchCount that specifies the upper limit of messages this receiver will actively receive regardless of whether a receive operation is pending. Defaults to 0.
Applies to
MessageReceiver(String, String, ReceiveMode, RetryPolicy, Int32)
- Source:
- MessageReceiver.cs
Creates a new MessageReceiver from a specified connection string and entity path.
public MessageReceiver (string connectionString, string entityPath, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.Core.MessageReceiver : string * string * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.Core.MessageReceiver
Public Sub New (connectionString As String, entityPath As String, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)
Parameters
- connectionString
- String
Namespace connection string used to communicate with Service Bus. Must not contain Entity details.
- entityPath
- String
The path of the entity for this receiver. For Queues this will be the name, but for Subscriptions this will be the path. You can use FormatSubscriptionPath(String, String), to help create this path.
- receiveMode
- ReceiveMode
The ReceiveMode used to specify how messages are received. Defaults to PeekLock mode.
- retryPolicy
- RetryPolicy
The RetryPolicy that will be used when communicating with Service Bus. Defaults to Default
- prefetchCount
- Int32
The PrefetchCount that specifies the upper limit of messages this receiver will actively receive regardless of whether a receive operation is pending. Defaults to 0.
Remarks
Creates a new connection to the entity, which is opened during the first operation.
Applies to
MessageReceiver(String, String, ITokenProvider, TransportType, ReceiveMode, RetryPolicy, Int32)
- Source:
- MessageReceiver.cs
Creates a new MessageReceiver from a specified endpoint, entity path, and token provider.
public MessageReceiver (string endpoint, string entityPath, Microsoft.Azure.ServiceBus.Primitives.ITokenProvider tokenProvider, Microsoft.Azure.ServiceBus.TransportType transportType = Microsoft.Azure.ServiceBus.TransportType.Amqp, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default, int prefetchCount = 0);
new Microsoft.Azure.ServiceBus.Core.MessageReceiver : string * string * Microsoft.Azure.ServiceBus.Primitives.ITokenProvider * Microsoft.Azure.ServiceBus.TransportType * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy * int -> Microsoft.Azure.ServiceBus.Core.MessageReceiver
Public Sub New (endpoint As String, entityPath As String, tokenProvider As ITokenProvider, Optional transportType As TransportType = Microsoft.Azure.ServiceBus.TransportType.Amqp, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing, Optional prefetchCount As Integer = 0)
Parameters
- endpoint
- String
Fully qualified domain name for Service Bus. Most likely, {yournamespace}.servicebus.windows.net
- entityPath
- String
Queue path.
- tokenProvider
- ITokenProvider
Token provider which will generate security tokens for authorization.
- transportType
- TransportType
Transport type.
- receiveMode
- ReceiveMode
Mode of receive of messages. Defaults to ReceiveMode.PeekLock.
- retryPolicy
- RetryPolicy
Retry policy for queue operations. Defaults to Default
- prefetchCount
- Int32
The PrefetchCount that specifies the upper limit of messages this receiver will actively receive regardless of whether a receive operation is pending. Defaults to 0.
Remarks
Creates a new connection to the entity, which is opened during the first operation.
Applies to
Azure SDK for .NET