コード例 #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);
        }
コード例 #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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void Remove(NmsMessageConsumer messageConsumer)
 {
     consumers.TryRemove(messageConsumer.Info.Id, out messageConsumer);
 }
コード例 #5
0
 public MessageDeliveryTask(NmsMessageConsumer consumer)
 {
     this.consumer = consumer;
 }
コード例 #6
0
 public NmsConsumer(ISession session, NmsMessageConsumer consumer)
 {
     this.session  = session;
     this.consumer = consumer;
 }