Rhino.Queues.QueueManager.CreateQueues C# (CSharp) Method

CreateQueues() public method

public CreateQueues ( ) : void
return void
        public void CreateQueues(params string[] queueNames)
        {
            AssertNotDisposedOrDisposing();

            queueStorage.Global(actions =>
            {
                foreach (var queueName in queueNames)
                {
                    actions.CreateQueueIfDoesNotExists(queueName);
                }

                actions.Commit();
            });
        }

Usage Example

        public DistributedHashTableStorageHost(
            Uri master,
            string name,
            int port)
        {
            Endpoint = new NodeEndpoint
            {
                Sync = new Uri("rhino.dht://" + Environment.MachineName + ":" + port + "/"),
                Async = new Uri("rhino.queues://" + Environment.MachineName + ":" + (port + 1) + "/replication")
            };
            queueManager = new QueueManager(new IPEndPoint(IPAddress.Any, port + 1), name + ".queue.esent");
            queueManager.CreateQueues("replication");
            node = new DistributedHashTableNode(
                new DistributedHashTableMasterClient(master),
                new ThreadPoolExecuter(),
                new BinaryMessageSerializer(),
                Endpoint,
                queueManager,
                new NonPooledDistributedHashTableNodeFactory()
                );
            var dhtStorage = new DistributedHashTableStorage(name + ".data.esent", node);
            replication = dhtStorage.Replication;
            storage = dhtStorage;

            listener = new TcpListener(
                Socket.OSSupportsIPv6 ? IPAddress.IPv6Any : IPAddress.Any,
                port);
        }
All Usage Examples Of Rhino.Queues.QueueManager::CreateQueues