Example #1
0
 public SubscriptionInfo(SubscriptionAction subscriptionAction, MessageBusConsumer consumer, MessageCallback callback, bool modelIsSingleUse, IModel channel)
 {
     SubscriptionAction = subscriptionAction;
     Consumer           = consumer;
     Callback           = callback;
     ModelIsSingleUse   = modelIsSingleUse;
     Channel            = channel;
 }
Example #2
0
        public DefaultBasicConsumer CreateConsumer(
            SubscriptionAction subscriptionAction,
            IModel model,
            bool modelIsSingleUse,
            MessageCallback callback)
        {
            var consumer    = new MessageBusConsumer(model, queue);
            var consumerTag = Guid.NewGuid().ToString();

            consumer.ConsumerTag = consumerTag;
            subscriptions.Add(consumerTag, new SubscriptionInfo(subscriptionAction, consumer, callback, modelIsSingleUse, model));

            return(consumer);
        }
 public SubscriptionInfo(SubscriptionAction subscriptionAction, MessageBusConsumer consumer, MessageCallback callback, bool modelIsSingleUse, IModel channel)
 {
     SubscriptionAction = subscriptionAction;
     Consumer = consumer;
     Callback = callback;
     ModelIsSingleUse = modelIsSingleUse;
     Channel = channel;
 }
        public DefaultBasicConsumer CreateConsumer(
            SubscriptionAction subscriptionAction,
            IModel model,
            bool modelIsSingleUse,
            MessageCallback callback)
        {
            var consumer = new MessageBusConsumer(model, queue);
            var consumerTag = Guid.NewGuid().ToString();
            consumer.ConsumerTag = consumerTag;
            subscriptions.Add(consumerTag, new SubscriptionInfo(subscriptionAction, consumer, callback, modelIsSingleUse, model));

            return consumer;
        }