Ejemplo n.º 1
0
        private static Dictionary <string, string> BuildProviderSettings()
        {
            var settings = new Dictionary <string, string>();

            // get initial settings from configs
            ProviderConfig.WriteProperties(settings);
            EventHubConfig.WriteProperties(settings);
            CheckpointerSettings.WriteProperties(settings);
            return(settings);
        }
Ejemplo n.º 2
0
        private static Dictionary <string, string> BuildProviderSettings()
        {
            var settings = new Dictionary <string, string>();

            // get initial settings from configs
            ProviderConfig.WriteProperties(settings);
            EventHubConfig.WriteProperties(settings);

            // add queue balancer setting
            settings.Add(PersistentStreamProviderConfig.QUEUE_BALANCER_TYPE, StreamQueueBalancerType.DynamicClusterConfigDeploymentBalancer.ToString());

            // add pub/sub settting
            settings.Add(PersistentStreamProviderConfig.STREAM_PUBSUB_TYPE, StreamPubSubType.ImplicitOnly.ToString());
            return(settings);
        }
        public static void AdjustClusterConfiguration(ClusterConfiguration config)
        {
            var settings = new Dictionary <string, string>();

            // get initial settings from configs
            ProviderConfig.WriteProperties(settings);
            EventHubConfig.WriteProperties(settings);

            // add queue balancer setting
            settings.Add(PersistentStreamProviderConfig.QUEUE_BALANCER_TYPE, StreamQueueBalancerType.DynamicClusterConfigDeploymentBalancer.ToString());

            // register stream provider
            config.Globals.RegisterStreamProvider <EventHubStreamProvider>(StreamProviderName, settings);
            config.Globals.RegisterStorageProvider <MemoryStorage>("PubSubStore");

            // make sure all node configs exist, for dynamic cluster queue balancer
            config.GetOrAddConfigurationForNode("Primary");
            config.GetOrAddConfigurationForNode("Secondary_1");
        }
Ejemplo n.º 4
0
        public static void AdjustClusterConfiguration(ClusterConfiguration config)
        {
            var settings = new Dictionary <string, string>();

            // get initial settings from configs
            ProviderConfig.WriteProperties(settings);
            EventHubConfig.WriteProperties(settings);

            // add queue balancer setting
            settings.Add(PersistentStreamProviderConfig.QUEUE_BALANCER_TYPE, StreamQueueBalancerType.DynamicClusterConfigDeploymentBalancer.ToString());

            // register stream provider
            config.Globals.RegisterStreamProvider <EventHubStreamProvider>(StreamProviderName, settings);
            config.Globals.RegisterStorageProvider <MemoryStorage>("PubSubStore");

            // Make sure a node config exist for each silo in the cluster.
            // This is required for the DynamicClusterConfigDeploymentBalancer to properly balance queues.
            config.GetOrCreateNodeConfigurationForSilo("Primary");
            config.GetOrCreateNodeConfigurationForSilo("Secondary_1");
        }
Ejemplo n.º 5
0
        public override ClientConfiguration Build()
        {
            var rvalue = _builder.Build();

            var settings = new Dictionary <string, string>();

            EventHubStreamProviderSettings providerSettings = new EventHubStreamProviderSettings(_providerName);

            providerSettings.WriteProperties(settings);

            EventHubCheckpointerSettings checkpoint = new EventHubCheckpointerSettings(_checkpointConnectionString, _checkpointTableName, _checkpointNamespace, _checkpointInterval);

            checkpoint.WriteProperties(settings);

            EventHubSettings eventHub = new EventHubSettings(_hubConnectionString, _consumerGroup, _path);

            eventHub.WriteProperties(settings);

            rvalue.RegisterStreamProvider <EventHubStreamProvider>(_providerName, settings);

            return(rvalue);
        }