Esempio n. 1
0
        public AzureServiceBusEventDispatcherReceiver(string connectionString, IEventDispatcher innerEventDispatcher, IEventStore eventStore, string topicName, string subscriptionName)
        {
            _innerEventDispatcher = innerEventDispatcher;
            _eventStore           = eventStore;

            AzureHelpers.EnsureTopicExists(connectionString, topicName);
            AzureHelpers.EnsureSubscriptionExists(connectionString, topicName, subscriptionName);

            _subscriptionClient = SubscriptionClient.CreateFromConnectionString(connectionString, topicName, subscriptionName);

            _workerThread = new Thread(DoWork);
        }
Esempio n. 2
0
        public AzureServiceBusEventDispatcherSender(string connectionString, string topicName)
        {
            AzureHelpers.EnsureTopicExists(connectionString, topicName);

            _topicClient = TopicClient.CreateFromConnectionString(connectionString, topicName);
        }