automated-testing-demo/consumer/Consumer.cs

21 lines
477 B
C#
Raw Normal View History

2024-06-14 14:48:52 +00:00
using System;
using System.Threading;
using Confluent.Kafka;
using Model;
2024-06-14 15:27:10 +00:00
using Repository;
2024-06-14 14:48:52 +00:00
using Serializers;
2024-06-14 21:06:24 +00:00
using Subscriber;
2024-06-14 14:48:52 +00:00
class Consumer
{
2024-06-14 21:06:24 +00:00
public static async Task Main(string[] args)
2024-06-14 14:48:52 +00:00
{
2024-06-14 15:27:10 +00:00
DataRepository dataRepository = new DataRepository("mongodb://mongo:mongo@localhost:27017", "mongo");
2024-06-14 21:06:24 +00:00
DataSubscriber dataSubscriber = new DataSubscriber("test-topic", "localhost:29092", dataRepository);
2024-06-14 14:48:52 +00:00
2024-06-14 21:06:24 +00:00
await dataSubscriber.Subscribe();
2024-06-14 14:48:52 +00:00
}
}