Skip to content

A Kafka-like server and client for .NET using LiteDB as persistent storage

Notifications You must be signed in to change notification settings

uleelx/ForgetDB

Repository files navigation

ForgetDB

A Kafka-like server and client for .NET using LiteDB as persistent storage

Quick Look

// Server

using (ForgetServer server = new ForgetServer(9050))
{
	Console.ReadLine();
}
// Client - Produce
using (var client = new ForgetClient<string>("localhost:9050", "Anonymous"))
{
	for (int i = 0; i < 1000; i++)
	{
		string v = $"world{i}";
		client.Produce("hello", v);
	}
	client.Produce("ok","YES");
}

// Client - Consume
using (var client = new ForgetClient<string>("localhost:9050", "Anonymous"))
{
	client.Subscribe("hello");

	for (int i = 0; i < 1000; i++)
	{
		string v = $"world{i}";
		string w = client.Consume();
		if (v != w)
		{
			Console.Write($"{v}|{w}\t");
		}
	}
}

About

A Kafka-like server and client for .NET using LiteDB as persistent storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages