public Task<IMessageQueueingService> CreateMessageQueueingService(QueueingElement configuration)
 {
     var path = configuration.GetString("path");
     var fsQueueingBaseDir = new DirectoryInfo(GetRootedPath(path));
     var fsQueueingService = new FilesystemMessageQueueingService(fsQueueingBaseDir);
     fsQueueingService.Init();
     return Task.FromResult<IMessageQueueingService>(fsQueueingService);
 }
        public Task<IMessageQueueingService> CreateMessageQueueingService(QueueingElement configuration)
        {
            var uri = configuration.GetUri("uri") ?? new Uri("amqp://localhost:5672");

            var encodingName = configuration.GetString("encoding");
            if (string.IsNullOrWhiteSpace(encodingName))
            {
                encodingName = "UTF-8";
            }

            var encoding = ParseEncoding(encodingName);
            var messageQueueingService = new RabbitMQMessageQueueingService(uri, encoding: encoding);
            return Task.FromResult<IMessageQueueingService>(messageQueueingService);
        }
        public Task<IMessageQueueingService> CreateMessageQueueingService(QueueingElement configuration)
        {
            var connectionName = configuration.GetString("connectionName");
            if (string.IsNullOrWhiteSpace(connectionName))
            {
                throw new ConfigurationErrorsException(
                    "Attribute 'connectionName' is required for SQL message queueing service");
            }

            var connectionStringSettings = ConfigurationManager.ConnectionStrings[connectionName];
            if (connectionStringSettings == null)
            {
                throw new ConfigurationErrorsException("Connection string settings \"" + connectionName + "\" not found");
            }
            var sqlMessageQueueingService = new SQLMessageQueueingService(connectionStringSettings);
            sqlMessageQueueingService.Init();
            return Task.FromResult<IMessageQueueingService>(sqlMessageQueueingService);
        }
        public static Task <IMessageQueueingService> InitMessageQueueingService(QueueingElement config)
        {
            var factory = new MessageQueueingServiceFactory();

            return(factory.InitMessageQueueingService(config));
        }
 public Task<IMessageQueueingService> CreateMessageQueueingService(QueueingElement configuration)
 {
     return Task.FromResult<IMessageQueueingService>(new InMemoryMessageQueueingService());
 }