public InitQueueAsync ( ) : System.Threading.Tasks.Task | ||
Résultat | System.Threading.Tasks.Task |
public async Task QueueMessageBatchAsync <T>(Guid streamGuid, string streamNamespace, IEnumerable <T> events, StreamSequenceToken token, Dictionary <string, object> requestContext) { var queueId = _streamQueueMapper.GetQueueForStream(streamGuid, streamNamespace); RabbitMessageQueueDataManager queue; if (!Queues.TryGetValue(queueId, out queue)) { var tmpQueue = new RabbitMessageQueueDataManager(queueId.ToString(), DeploymentId, DataConnectionString); await tmpQueue.InitQueueAsync(); queue = Queues.GetOrAdd(queueId, tmpQueue); } var cloudMsg = RabbitMessageQueueBatchContainer.ToCloudQueueMessage(streamGuid, streamNamespace, events, requestContext); await queue.AddQueueMessage(cloudMsg); }
public Task Initialize(TimeSpan timeout) { return(_queue != null?_queue.InitQueueAsync() : TaskDone.Done); // check in case we already shut it down. }