Beispiel #1
0
        public LightningQueue(int port, bool persistent, LightningQueueSettings settings)
        {
            Port       = port;
            Persistent = persistent;
            var queueConfiguration = new QueueConfiguration()
                                     .ReceiveMessagesAt(new IPEndPoint(IPAddress.Any, port))
                                     .ScheduleQueueWith(TaskPoolScheduler.Default);

            // TODO -- bring through whatever the Jasper logging abstraction ends up being here.
            //.LogWith(new FubuLoggingAdapter(_logger));

            if (persistent)
            {
                queueConfiguration.StoreWithLmdb(settings.QueuePath + "." + port, new EnvironmentConfiguration
                {
                    MaxDatabases = settings.MaxDatabases, MapSize = settings.MapSize
                });
            }
            else
            {
                queueConfiguration.UseNoStorage();
            }

            _queue = queueConfiguration.BuildQueue();
        }
Beispiel #2
0
 public LightningQueuesTransport(LightningQueueSettings settings)
 {
     _settings = settings;
 }