public void Should_create_a_publisher_with_secondary_eventgrid_endpoint()
        {
            // arrange
            var builder = new EventGridClusterBuilder(ConfigStore.FromValue("http://endpoint", "test"));

            // assert
            var actual = builder.AddSecondary(ConfigStore.FromValue("http://endpoint2", "test"))
                         .Build();

            Assert.NotNull(actual);
        }
Exemplo n.º 2
0
        static Function1()
        {
            // TODO: Enter values for <topic-name> and <region>
            string topicEndpoint = "<topic-name>";

            // TODO: Enter value for <topic-key>
            string topicKey = "<topic-key>";

            cluster = new EventGridClusterBuilder(ConfigStore.FromValue(topicEndpoint, topicKey))
                      .Build();
        }
Exemplo n.º 3
0
        static async Task Main(string[] args)
        {
            // TODO: Enter values for <topic-name> and <region>
            string topicEndpoint = "<topic-name>";

            // TODO: Enter value for <topic-key>
            string topicKey = "<topic-key>";


            string topicHostname = new Uri(topicEndpoint).Host;

            var cluster = new EventGridClusterBuilder(ConfigStore.FromValue(topicEndpoint, topicKey))
                          .AddSecondary(ConfigStore.FromValue("<secondary1-topic-name>", "topic-key1"))
                          .AddSecondary(ConfigStore.FromValue("<secondary2-topic-name>", "topic-key2"))
                          .Build();

            for (int i = 0; i < 1; i++)
            {
                await cluster.PublishAsync(GetEventsList());
            }
            Console.Write($"Published events to Event Grid. at {DateTime.UtcNow.ToString("yyyyMMddHHmmssfff")}");
            Console.ReadLine();
        }