Ejemplo n.º 1
0
        public async ValueTask <bool> QueueBindAsync(string queueName, string exchangeName, string routingKey = "", Dictionary <string, object> arguments = null)
        {
            await _semafore.WaitAsync().ConfigureAwait(false);

            _commonSrc = new TaskCompletionSource <bool>();
            var info = new QueueBindInfo(queueName, exchangeName, routingKey, false, arguments);

            await SendQueueBind(info).ConfigureAwait(false);

            var result = await _commonSrc.Task.ConfigureAwait(false);

            _semafore.Release();
            return(result);
        }
Ejemplo n.º 2
0
        public ValueTask QueueBindNoWaitAsync(string queueName, string exchangeName, string routingKey = "", Dictionary <string, object> arguments = null)
        {
            var info = new QueueBindInfo(queueName, exchangeName, routingKey, true, arguments);

            return(SendQueueBind(info));
        }