FRENDS⁴ Common Components : FRENDS.Common.Services.ServiceBus.SendOneWay

Added in version: 2.3.0.0

Send message to service bus. This method doesn't wait for the reply. If method is unable to send message all errors are always thrown as an exception.

Parameters:

TypeNameDescription
stringdataData that will be send to the service bus
ServiceBusSettings

settings

TypeNameDescription

long

TimeoutMsTime to send data into servicebus before exception is thrown
stringConnectionStringServicebus connection string
stringQueueNameName of the queue
stringMessageIdMessage ID of the message. This value can be null or empty(then used guid). Custom ID:s can be used to locate message in queue.
stringSessionIdIf message is response to twoway call. Then this value
boolUseCachedUse previously created client to servicebus(faster). Otherwise use new client to servicebus.
Class contains data sending settings
CancellationTokentokenCancellation

Output:

bool: always true

Example:

var settings = new ServiceBusSettings {

TimeoutMs = 10,

ConnectionString = "Endpoint=sb://FRENDS/FRENDS-NS;StsEndpoint=https://FRENDS:1234/FRENDS-NS;RuntimePort=2345;ManagementPort=1234;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=abc",

QueueName = "queue",

MessageId = "",

SessionId = "",

UseCached = true

}

SendOneWay("Body", settings, new CancellationToken())