/// <summary> /// Creates an async consumer queue that uses a task scheduler. The default task factory will be used. /// </summary> /// <param name="queueConnection">Queue and connection information.</param> /// <returns></returns> public IConsumerMethodQueueScheduler CreateConsumerMethodQueueScheduler(QueueConnection queueConnection) { Guard.NotNull(() => queueConnection, queueConnection); var schedulerCreator = new SchedulerContainer(_registerService); var factory = schedulerCreator.CreateTaskFactory(); factory.Scheduler.Start(); Containers.Add(schedulerCreator); return(CreateConsumerMethodQueueSchedulerInternal(queueConnection, factory, null, true)); }
/// <summary> /// Creates an async consumer queue that uses a task scheduler. The default task factory will be used. /// </summary> /// <param name="queue">The queue.</param> /// <param name="connection">The connection.</param> /// <returns></returns> public IConsumerQueueScheduler CreateConsumerQueueScheduler(string queue, string connection) { Guard.NotNullOrEmpty(() => queue, queue); Guard.NotNullOrEmpty(() => connection, connection); var schedulerCreator = new SchedulerContainer(_registerService); var factory = schedulerCreator.CreateTaskFactory(); factory.Scheduler.Start(); Containers.Add(schedulerCreator); return(CreateConsumerQueueSchedulerInternal(queue, connection, factory, null, true)); }