protected override IChannel buildChannel(ChannelNode channelNode) { var uri = new LightningUri(channelNode.Uri); return(channelNode.Mode == ChannelMode.DeliveryGuaranteed ? LightningQueuesChannel.BuildPersistentChannel(uri, _queues, _settings.MapSize, _settings.MaxDatabases, channelNode.Incoming) : LightningQueuesChannel.BuildNoPersistenceChannel(uri, _queues, channelNode.Incoming)); }
public void Send(Envelope envelope) { var uri = new LightningUri(envelope.Destination); var message = new OutgoingMessage { Id = MessageId.GenerateRandom(), Data = envelope.Data, Headers = envelope.Headers.ToDictionary(), SentAt = DateTime.UtcNow, Destination = envelope.Destination, Queue = uri.QueueName }; message.TranslateHeaders(); _context.Send(message); }
public static LightningQueuesChannel BuildNoPersistenceChannel(LightningUri uri, IPersistentQueues queues, bool incoming) { var queueManager = queues.NonPersistentManagerFor(uri.Port, incoming); return new LightningQueuesChannel(uri.Address, uri.QueueName, queueManager); }
public static LightningQueuesChannel BuildPersistentChannel(LightningUri uri, IPersistentQueues queues, int mapSize, int maxDatabases, bool incoming) { var queueManager = queues.PersistentManagerFor(uri.Port, incoming, mapSize, maxDatabases); return new LightningQueuesChannel(uri.Address, uri.QueueName, queueManager); }
public void CreateQueue(LightningUri uri) { GetQueue(uri.Port, true, true).CreateQueue(uri.QueueName); }
public void CreateQueue(LightningUri uri) { _queueManagers[uri.Port].CreateQueues(uri.QueueName); }
public static LightningQueuesChannel Build(LightningUri uri, IPersistentQueues queues, IDelayedMessageCache<MessageId> delayedMessages, bool incoming) { var queueManager = queues.ManagerFor(uri.Port, incoming); return new LightningQueuesChannel(uri.Address, uri.QueueName, queueManager, delayedMessages); }
public static LightningQueuesChannel BuildNoPersistenceChannel(LightningUri uri, IPersistentQueues queues, bool incoming) { var queueManager = queues.NonPersistentManagerFor(uri.Port, incoming); return(new LightningQueuesChannel(uri.Address, uri.QueueName, queueManager)); }
public static LightningQueuesChannel BuildPersistentChannel(LightningUri uri, IPersistentQueues queues, int mapSize, int maxDatabases, bool incoming) { var queueManager = queues.PersistentManagerFor(uri.Port, incoming, mapSize, maxDatabases); return(new LightningQueuesChannel(uri.Address, uri.QueueName, queueManager)); }
public IChannel BuildDestinationChannel(Uri destination) { var lqUri = new LightningUri(destination); return(new LightningQueuesReplyChannel(destination, _queues.ManagerForReply(), lqUri.QueueName)); }
public IChannel BuildDestinationChannel(Uri destination) { var lqUri = new LightningUri(destination); return new LightningQueuesReplyChannel(destination, _queues.ManagerForReply(), lqUri.QueueName); }
protected override IChannel buildChannel(ChannelNode channelNode) { var uri = new LightningUri(channelNode.Uri); return channelNode.Mode == ChannelMode.DeliveryGuaranteed ? LightningQueuesChannel.BuildPersistentChannel(uri, _queues, _settings.MapSize, _settings.MaxDatabases, channelNode.Incoming) : LightningQueuesChannel.BuildNoPersistenceChannel(uri, _queues, channelNode.Incoming); }
public static LightningQueuesChannel Build(LightningUri uri, IPersistentQueues queues, IDelayedMessageCache <MessageId> delayedMessages, bool incoming) { var queueManager = queues.ManagerFor(uri.Port, incoming); return(new LightningQueuesChannel(uri.Address, uri.QueueName, queueManager, delayedMessages)); }