private ServiceBusSender GetOrAddMessageSender(string entityPath, string connectionString) { ServiceBusClient client = _clientCache.GetOrAdd(connectionString, CreateClient(connectionString)); return(_messageSenderCache.GetOrAdd(entityPath, client.CreateSender(entityPath))); }
public static ServiceBusTriggerInput CreateSingle(ServiceBusReceivedMessage message, ServiceBusMessageActions messageActions, ServiceBusReceiveActions receiveActions, ServiceBusClient client) { return(new ServiceBusTriggerInput { Messages = new ServiceBusReceivedMessage[] { message }, _isSingleDispatch = true, MessageActions = messageActions, ReceiveActions = receiveActions, Client = client }); }
public static ServiceBusTriggerInput CreateBatch(ServiceBusReceivedMessage[] messages, ServiceBusMessageActions messageActions, ServiceBusReceiveActions receiveActions, ServiceBusClient client) { return(new ServiceBusTriggerInput { Messages = messages, _isSingleDispatch = false, MessageActions = messageActions, ReceiveActions = receiveActions, Client = client }); }
public SessionMessageProcessor(ServiceBusClient client, ServiceBusSessionProcessor processor) { Processor = processor ?? throw new ArgumentNullException(nameof(processor)); Client = client ?? throw new ArgumentNullException(nameof(client)); }