Ejemplo n.º 1
0
        internal static async Task <AdvisoryConsumer> CreateAsync(Connection connection, ConsumerId consumerId)
        {
            var advisoryConsumer = new AdvisoryConsumer(connection, consumerId);

            connection.AddDispatcher(consumerId, advisoryConsumer);
            await connection.SyncRequestAsync(advisoryConsumer.info).Await();

            return(advisoryConsumer);
        }
Ejemplo n.º 2
0
        public void AddConsumer(MessageConsumer consumer)
        {
            if (!this.closing)
            {
                ConsumerId id = consumer.ConsumerId;

                // Registered with Connection before we register at the broker.
                consumers[id] = consumer;
                connection.AddDispatcher(id, this);
            }
        }