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); }
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); }
public void Remove(NmsMessageConsumer messageConsumer) { consumers.TryRemove(messageConsumer.Info.Id, out messageConsumer); }
public MessageDeliveryTask(NmsMessageConsumer consumer) { this.consumer = consumer; }
public NmsConsumer(ISession session, NmsMessageConsumer consumer) { this.session = session; this.consumer = consumer; }