/// <summary> /// Start the receiver. /// </summary> /// <param name="receiver"></param> /// <param name="handlerMap"></param> private void StartReceiver(IMessagePump receiver, MessageHandlerMap handlerMap) { MessagingEventSource.Log.MessageReceiverStarting(receiver, handlerMap); receiver.StartAsync(message => OnHandleMessage(receiver, null, message, handlerMap), OnError, new ServiceBus.Receive.OnMessageOptions { AutoComplete = false }).Wait(); }
public static Task StartAsync(this IMessagePump pump, OnMessage messageHandler) { return(pump.StartAsync(messageHandler, null, null)); }
public static Task StartAsync(this IMessagePump pump, OnMessage messageHandler, OnMessageException exception) { return(pump.StartAsync(messageHandler, exception, null)); }
public static Task StartAsync(this IMessagePump pump, OnMessage messageHandler, OnMessageOptions options) { return(pump.StartAsync(messageHandler, null, options)); }
/// <summary> /// Start the receiver. /// </summary> /// <param name="receiver"></param> /// <param name="handlerMap"></param> private void StartReceiver(IMessagePump receiver, MessageHandlerMap handlerMap) { MessengerEventSource.Log.MessageReceiverStarting(receiver, handlerMap); receiver.StartAsync(message => OnHandleMessage(receiver, null, message, handlerMap), OnError).Wait(); }