ServiceBusSource<TOutput>
Class ServiceBusSource<TOutput>
A data flow source for Azure service bus. This will receive messages from the source for furhter processing. MaxMessages to adjust the number of messages fetched per request. Adjust the ReceiverOptions to your needs - the default receive mode is PeekLock. The source will read until either the MaxWaitTime has been reached during a request or if no new messages can be read from the source.
Inherited Members
Namespace: ETLBox.Azure.ServiceBus
Assembly: ETLBox.Azure.ServiceBus.dll
Syntax
public class ServiceBusSource<TOutput> : DataFlowExecutableSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTaskType Parameters
| Name | Description |
|---|---|
| TOutput | Type of outgoing data. |
Constructors
ServiceBusSource()
Declaration
public ServiceBusSource()Properties
Client
The client that owns the connection and can be used to create senders and receivers.
Automatically created if you provide a ConnectionString, unless you provide your own instance here.
Declaration
public ServiceBusClient Client { get; set; }Property Value
| Type | Description |
|---|---|
| ServiceBusClient |
ClientOptions
The client options used when instantiating a new client.
Declaration
public ServiceBusClientOptions ClientOptions { get; set; }Property Value
| Type | Description |
|---|---|
| ServiceBusClientOptions |
ConnectionString
If you provide a namespace connection string, this component will create new ServiceBusClient object to communicate with the Azure Service Bus. If you need to reuse an existing Client object, you can provide your own via the Client property.
Declaration
public string ConnectionString { get; set; }Property Value
| Type | Description |
|---|---|
| string |
ContinueReceiving
Function that determines if the next message should be retrieved, based on the last retrieved message.
Declaration
public Func<IReadOnlyList<ServiceBusReceivedMessage>, bool> ContinueReceiving { get; set; }Property Value
| Type | Description |
|---|---|
| Func<IReadOnlyList<ServiceBusReceivedMessage>, bool> |
MaxMessages
The maximum number of messages that will be received per request.
This method doesn't guarantee to return exact MaxMessages messages,
even if there are MaxMessages messages available in the queue or topic.
Default is 1.
Declaration
public int MaxMessages { get; set; }Property Value
| Type | Description |
|---|---|
| int |
MaxWaitTime
The maximum wait time for the next message. Set this to null if you want to wait indefinitely. If the wait time is has been reached, the Service Bus Source will send the already received message into the data flow.
Declaration
public TimeSpan? MaxWaitTime { get; set; }Property Value
| Type | Description |
|---|---|
| TimeSpan? |
QueueOrTopicName
Name of the destination queue or topic
Declaration
public string QueueOrTopicName { get; set; }Property Value
| Type | Description |
|---|---|
| string |
Receiver
The receiver used to read messages to the queue. Automatically created from the Client.
Declaration
public ServiceBusReceiver Receiver { get; }Property Value
| Type | Description |
|---|---|
| ServiceBusReceiver |
ReceiverOptions
The reciver options used when instantiating a new reciver.
Declaration
public ServiceBusReceiverOptions ReceiverOptions { get; set; }Property Value
| Type | Description |
|---|---|
| ServiceBusReceiverOptions |
SubscriptionName
Optional: The subscription name
Declaration
public string SubscriptionName { get; set; }Property Value
| Type | Description |
|---|---|
| string |
Methods
CheckParameter()
Declaration
protected override void CheckParameter()Overrides
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)Parameters
| Type | Name | Description |
|---|---|---|
| Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()Overrides
InitCheckedParameter()
Declaration
protected override void InitCheckedParameter()Overrides
OnExecutionDoAsyncWork()
Declaration
protected override void OnExecutionDoAsyncWork()