Ejemplo n.º 1
0
        public async Task <IMessageConsumer> CreateConsumerAsync(IDestination destination, string selector, bool noLocal)
        {
            CheckClosed();

            NmsMessageConsumer messageConsumer = new NmsMessageConsumer(GetNextConsumerId(), this, destination, selector, noLocal);
            await messageConsumer.Init().Await();

            return(messageConsumer);
        }
Ejemplo n.º 2
0
        public IMessageConsumer CreateConsumer(IDestination destination, string selector, bool noLocal)
        {
            CheckClosed();

            NmsMessageConsumer messageConsumer = new NmsMessageConsumer(GetNextConsumerId(), this, destination, selector, noLocal);

            messageConsumer.Init().ConfigureAwait(false).GetAwaiter().GetResult();

            return(messageConsumer);
        }
        public IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal)
        {
            CheckClosed();

            NmsMessageConsumer messageConsumer = new NmsMessageConsumer(consumerIdGenerator.GenerateId(), this, destination, name, selector, noLocal);

            messageConsumer.Info.IsDurable = true;
            messageConsumer.Init().ConfigureAwait(false).GetAwaiter().GetResult();
            consumers.TryAdd(messageConsumer.Info.Id, messageConsumer);

            return(messageConsumer);
        }
Ejemplo n.º 4
0
 public void Remove(NmsMessageConsumer messageConsumer)
 {
     consumers.TryRemove(messageConsumer.Info.Id, out messageConsumer);
 }
 public MessageDeliveryTask(NmsMessageConsumer consumer)
 {
     this.consumer = consumer;
 }
Ejemplo n.º 6
0
 public NmsConsumer(ISession session, NmsMessageConsumer consumer)
 {
     this.session  = session;
     this.consumer = consumer;
 }