Ejemplo n.º 1
0
        internal override void RegisterChannel <T>(IBasicProperties basicProperties, AbstractConsumerFactory <T> factory, string queue, string errorQueue, string exchange, string routingKey)
        {
            Logger.Info("Registering... Consumer: " + factory + ", route: " + queue + ", errorRoute: " + errorQueue);

            ConsumerResolver <T> resolver = (int eventId, string eventName, string contractVersion) =>
            {
                if (eventId == Int32.MinValue)
                {
                    return(factory.ResolveEvent(eventName, contractVersion));
                }
                return(factory.ResolveEvent(eventId, contractVersion));
            };

            this.ChannelRegistration(basicProperties, queue, errorQueue, exchange, routingKey, resolver);
        }
 internal abstract void RegisterChannel <T>(IBasicProperties basicProperties, AbstractConsumerFactory <T> factory, string queue, string errorQueue, string exchange, string routingKey);
Ejemplo n.º 3
0
 public void Consume <T>(IBasicProperties basicProperties, AbstractConsumerFactory <T> factory, string queue, string errorQueue, string exchange, string routingKey)
 {
     this.channelManager.RegisterChannel(basicProperties, factory, queue, errorQueue, exchange, routingKey);
 }