public async Task <ICommonQueueEndpointConsumeController> Consume(CommonQueueConsumeEndpoint endpoint, Func <CommonMessage, Task> messageHandle) { CommonQueueEndpointConsumeControllerWrapper wrapper = null; if (!_start.Value) { var service = getService(endpoint.QueueType); var controller = await service.Consume(endpoint, endpoint.QueueConfiguration, messageHandle); if (controller != null) { _start.Value = true; wrapper = new CommonQueueEndpointConsumeControllerWrapper(controller, _start); } } return(wrapper); }
public async Task Update(CommonQueueConsumeEndpoint endpoint) { await _commonQueueConsumeEndpointStore.Update(endpoint); }
public async Task Delete(CommonQueueConsumeEndpoint endpoint) { await _commonQueueConsumeEndpointStore.Delete(endpoint.ID); }
public async Task Add(CommonQueueConsumeEndpoint endpoint) { await _commonQueueConsumeEndpointStore.Add(endpoint); }