Exemple #1
0
        public async static Task StartClient()
        {
            try
            {
                var configRoot = TestSilo.GetConfiguration();
                var builder    = new ClientBuilder()
                                 .WithClusterConfig(configRoot)
                                 .WithParts()
                                 .WithRabbitMQ(configRoot)
                                 .ConfigureLogging(logging =>
                {
                    logging.AddConfiguration(configRoot.GetSection("Logging")).AddConsole();
                    //logging.AddFile("./debug.txt");
                });

                clusterClient = builder.Build();
                await clusterClient.Connect();

                subscriptionHandle = await SubscribeStream(clusterClient);
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc);
                Console.WriteLine("Failure Starting client.");
                throw exc;
            }
        }
Exemple #2
0
 public static int Main(string[] args)
 {
     TestSilo.StartSilo().Wait();
     TestClient.StartClient().Wait();
     WaitForKey();
     TestClient.CloseClient().Wait();
     return(TestSilo.StopSilo().Result);
 }