Ejemplo n.º 1
0
        public Task Subscribe(Type eventType, ContextBag context)
        {
            using (var connection = connectionFactory.CreateAdministrationConnection())
                using (var channel = connection.CreateModel())
                {
                    routingTopology.SetupSubscription(channel, eventType, localQueue);
                }

            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
 public Task SubscribeAll(MessageMetadata[] eventTypes, ContextBag context, CancellationToken cancellationToken = default)
 {
     using (var connection = connectionFactory.CreateAdministrationConnection())
         using (var channel = connection.CreateModel())
         {
             foreach (var eventType in eventTypes)
             {
                 routingTopology.SetupSubscription(channel, eventType, localQueue);
             }
         }
     return(Task.CompletedTask);
 }