All Projects â†’ mookid8000 â†’ Topos

mookid8000 / Topos

Licence: MIT license
🌀 .NET Event Processing library

Programming Languages

C#
18002 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Topos

kafka-0.11-examples
Code snippets that demonstrate how to leverage the new Kafka 0.11 APIs
Stars: ✭ 17 (-22.73%)
Mutual labels:  kafka-consumer, kafka-producer
Kq
Kafka-based Job Queue for Python
Stars: ✭ 530 (+2309.09%)
Mutual labels:  kafka-consumer, kafka-producer
qwery
A SQL-like language for performing ETL transformations.
Stars: ✭ 28 (+27.27%)
Mutual labels:  kafka-consumer, kafka-producer
Qbusbridge
The Apache Kafka Client SDK
Stars: ✭ 272 (+1136.36%)
Mutual labels:  kafka-consumer, kafka-producer
Karafka
Framework for Apache Kafka based Ruby and Rails applications development.
Stars: ✭ 1,223 (+5459.09%)
Mutual labels:  kafka-consumer, kafka-producer
Kafka-quickstart
Kafka Examples focusing on Producer, Consumer, KStreams, KTable, Global KTable using Spring, Kafka Cluster Setup & Monitoring. Implementing Event Sourcing and CQRS Design Pattern using Kafka
Stars: ✭ 31 (+40.91%)
Mutual labels:  kafka-consumer, kafka-producer
Trubka
A CLI tool for Kafka
Stars: ✭ 296 (+1245.45%)
Mutual labels:  kafka-consumer, kafka-producer
kafka-encryption
Kafka End to End Encryption
Stars: ✭ 44 (+100%)
Mutual labels:  kafka-consumer, kafka-producer
Kattlo Cli
Kattlo CLI Project
Stars: ✭ 58 (+163.64%)
Mutual labels:  kafka-consumer, kafka-producer
Rafka
Kafka proxy with a simple API, speaking the Redis protocol
Stars: ✭ 49 (+122.73%)
Mutual labels:  kafka-consumer, kafka-producer
Librdkafka
The Apache Kafka C/C++ library
Stars: ✭ 5,617 (+25431.82%)
Mutual labels:  kafka-consumer, kafka-producer
Strimzi Kafka Bridge
Apache Kafka bridge
Stars: ✭ 137 (+522.73%)
Mutual labels:  kafka-consumer, kafka-producer
Kukulcan
A REPL for Apache Kafka
Stars: ✭ 103 (+368.18%)
Mutual labels:  kafka-consumer, kafka-producer
Apachekafkatutorials
Example Code for Kafka Tutorials @ Learning Journal
Stars: ✭ 155 (+604.55%)
Mutual labels:  kafka-consumer, kafka-producer
Event Sourcing Microservices Example
Learn about building microservices with event sourcing using Spring Boot and how to deploy a social network to Kubernetes using Docker Compose or Helm.
Stars: ✭ 167 (+659.09%)
Mutual labels:  event-driven
Dotnet New Caju
Learn Clean Architecture with .NET Core 3.0 🔥
Stars: ✭ 228 (+936.36%)
Mutual labels:  event-driven
Newbe.claptrap
This is a frameworks with reactive, event sourcing and Actor pattern as basic theories. On top of this, developers can create "distributed", "scale out", and "easy to test" application more simply. Claptrap and it`s Minions is on the way.
Stars: ✭ 163 (+640.91%)
Mutual labels:  event-driven
Rele
Easy to use Google Pub/Sub
Stars: ✭ 164 (+645.45%)
Mutual labels:  event-driven
azeroth-event
Lightweight event-driven framework
Stars: ✭ 18 (-18.18%)
Mutual labels:  event-driven
Dntframeworkcore
Lightweight and Extensible Infrastructure for Building Web Applications - Web Application Framework
Stars: ✭ 208 (+845.45%)
Mutual labels:  event-driven

Topos

It's something with topics.

Producing messages

Could e.g. be Apache Kafka, where we send a JSON-serialized message:

var producer = Configure
    .Producer(c => c.UseKafka("localhost:9092"))
    .Serialization(s => s.UseNewtonsoftJson())
    .Create();

// keep producer instance for the entire life of your app,
// remembering to dispose it when we shut down
Using(producer);

// send events like this:;
await producer.Send("someevents", new ToposMessage(new SomeEvent("This is just a message")), partitionKey: "customer-004");

Let's go through the different configuration parts:

// Topos configurations start with 'Configure.', no matter what you want to configure
var producer = Configure

    // we configure a producer that uses Kafka, seeding it with a couple of brokers
    .Producer(c => c.UseKafka("kafkahost01:9092", "kafkahost02:9092"))

    // tell Topos to JSON-serialize messages
    .Serialization(s => s.UseNewtonsoftJson())

    // creates the producer
    .Create();

Consuming messages

Let's also use Kafka to consume messages... the configuration is probably not that surprising to you, it's just Configure. and then let the fluent API guide you.

Check this out - here we set up a corresponding consumer that just prints out the contents from the received messages:

var consumer = Configure
    .Consumer("default-group", c => c.UseKafka("kafkahost01:9092", "kafkahost02:9092"))
    .Serialization(s => s.UseNewtonsoftJson())
    .Topics(t => t.Subscribe("someevents"))
    .Positions(p => p.StoreInMongoDb("mongodb://mongohost01/some_database", "Positions"))
    .Handle(async (messages, context, token) =>
    {
        foreach (var message in messages)
        {
            switch (message.Body)
            {
                case SomeEvent someEvent:
                    Console.WriteLine($"Got some event: {someEvent}");
                    break;
            }
        }
    })
    .Start();

// dispose consumer when you want to stop consuming messages
Using(consumer);

Let's go through the configuration again:

// start with 'Configure.'...
var consumer = Configure

    // configure a consumer instance as part of the group 'default-group', and use Kafka
    .Consumer("default-group", c => c.UseKafka("kafkahost01:9092", "kafkahost02:9092"))

    // use JSON
    .Serialization(s => s.UseNewtonsoftJson())

    // subscribe to 'someevents'
    .Topics(t => t.Subscribe("someevents"))

    // store positions in MongoDB
    .Positions(p => p.StoreInMongoDb("mongodb://mongohost01/some_database", "Positions"))

    // handle messages
    .Handle(async (messages, context, token) =>
    {
        foreach (var message in messages)
        {
            switch (message.Body)
            {
                case SomeEvent someEvent:
                    Console.WriteLine($"Got some event: {someEvent}");
                    break;
            }
        }
    })
    .Start();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].