Esempio n. 1
0
 public BatchSubscriptionHost(
     IObservableConnection connection,
     IRabbitMessageHandler <IEnumerable <T> > handler,
     IBatchSubscriptionConfig config, ILogger logger
     //            ,
     //            IEnumerable<IBatchRabbitMessageInterceptor<T>> interceptors
     )
 {
     logger.InfoFormat("Subscribing handler: {0} with Id {1}", config.Name, config.Id);
     Subscription = connection.SubscribeOnQueueToMessage(config, handler);
 }
Esempio n. 2
0
 public static IDisposable SubscribeOnQueueToMessage <T>(this IObservableConnection connection, string exchange, string subscriberQueue, IRabbitMessageHandler <T> handler)
 {
     return(connection.SubscribeOnQueueToMessage(new DefaultSubscriptionConfig(subscriberQueue), handler));
 }