forked from Azure/azure-schema-registry-for-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
24 lines (22 loc) · 957 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Configuration;
namespace EventHubsForKafkaSample
{
class Program
{
public static void Main(string[] args)
{
string brokerList = ConfigurationManager.AppSettings["EH_FQDN"];
string connectionString = ConfigurationManager.AppSettings["EH_JAAS_CONFIG"];
string topic = ConfigurationManager.AppSettings["EH_NAME"];
string caCertLocation = ConfigurationManager.AppSettings["CA_CERT_LOCATION"];
string consumerGroup = ConfigurationManager.AppSettings["KAFKA_GROUP"];
Console.WriteLine("Initializing Producer");
Worker.Producer(brokerList, connectionString, topic, caCertLocation).Wait();
Console.WriteLine();
Console.WriteLine("Initializing Consumer");
Worker.Consumer(brokerList, connectionString, consumerGroup, topic, caCertLocation);
Console.ReadKey();
}
}
}