Exemplo n.º 1
0
 public ListeningConnection(QueueSubscription queueSubscription, ISubscriptionConfig config, QueueSubscriptionCache subscriptionCache)
 {
     _queueSubscription = queueSubscription;
     _config            = config;
     _subscriptionCache = subscriptionCache;
     Logger             = new RabbitMqConsoleLogger();
 }
Exemplo n.º 2
0
 public SubscriptionHost(
     IObservableConnection connection,
     IRabbitMessageHandler <T> handler,
     ISubscriptionConfig config,
     ILogger logger
     //            ,
     //            IEnumerable<IRabbitMessageInterceptor<T>> interceptors
     )
 {
     logger.InfoFormat("Subscribing handler: {0} with Id {1}", config.Name, config.Id);
     Subscription = connection.SubscribeOnQueueToMessage(config, handler);
 }
Exemplo n.º 3
0
 protected AzureLoginUserBase(ISubscriptionConfig subscriptionConfig)
     : this(subscriptionConfig.SubscriptionId, subscriptionConfig.ClientId, subscriptionConfig.Tenant,
           subscriptionConfig.UserName, subscriptionConfig.Password)
 {
 }
Exemplo n.º 4
0
 public static IDisposable SubscribeOnQueueToMessage <T>(this IObservableConnection connection, ISubscriptionConfig config, IRabbitMessageHandler <T> handler)
 {
     return(connection.Queue(config.QueueName)
            .Open()
            .Stream <T>()
            .SubscribeWithAck(rm => { handler.Handle(rm.Message); }));
 }
 public SubscriberConfigBuilder(string queueName)
 {
     _subscriptionConfig = new DefaultSubscriptionConfig(queueName);
 }