Exemplo n.º 1
0
        public static IMessageProcessor CreateEventSubscriber(TopicSubscription[] topicSubscriptions,
                                                              string subscription,
                                                              string consumerId,
                                                              string[] handlerProviderNames,
                                                              ConsumerConfig consumerConfig = null)
        {
            subscription = Configuration.Instance.FormatAppName(subscription);
            var handlerProvider    = new EventSubscriberProvider(handlerProviderNames);
            var commandBus         = GetCommandBus();
            var messagePublisher   = GetMessagePublisher();
            var messageQueueClient = ObjectProviderFactory.GetService <IMessageQueueClient>();

            var eventSubscriber = new EventSubscriber(messageQueueClient,
                                                      handlerProvider,
                                                      commandBus,
                                                      messagePublisher,
                                                      subscription,
                                                      topicSubscriptions,
                                                      consumerId,
                                                      consumerConfig);

            return(eventSubscriber);
        }
Exemplo n.º 2
0
 public ICommitOffsetable StartSubscriptionClient(string topic, string subscriptionName, string consumerId,
                                                  OnMessagesReceived onMessagesReceived, ConsumerConfig consumerConfig = null)
 {
     return(null);
 }
Exemplo n.º 3
0
 public ICommitOffsetable StartQueueClient(string commandQueueName, string consumerId,
                                           OnMessagesReceived onMessagesReceived, ConsumerConfig consumerConfig = null)
 {
     return(null);
 }
Exemplo n.º 4
0
 public IMessageConsumer StartSubscriptionClient(string[] topics, string subscriptionName, string consumerId, OnMessagesReceived onMessagesReceived, ConsumerConfig consumerConfig = null)
 {
     return(null);
 }