![]() |
VOOZH | about |
dotnet add package Topos --version 0.52.0
NuGet\Install-Package Topos -Version 0.52.0
<PackageReference Include="Topos" Version="0.52.0" />
<PackageVersion Include="Topos" Version="0.52.0" />Directory.Packages.props
<PackageReference Include="Topos" />Project file
paket add Topos --version 0.52.0
#r "nuget: Topos, 0.52.0"
#:package Topos@0.52.0
#addin nuget:?package=Topos&version=0.52.0Install as a Cake Addin
#tool nuget:?package=Topos&version=0.52.0Install as a Cake Tool
It's something with topics.
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();
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();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Topos:
| Package | Downloads |
|---|---|
|
Topos.Kafka
Kafka-based broker implementation for Topos. |
|
|
Topos.NewtonsoftJson
Newtonsoft JSON.NET-based message serializer for Topos. |
|
|
Topos.Serilog
Serilog-based logger factory implementation for Topos. |
|
|
DAX.EventProcessing.Serialization
Package Description |
|
|
Topos.Faster
Microsoft FASTER-based broker implementation for Topos. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.52.0 | 494 | 5/19/2026 |
| 0.51.0 | 8,440 | 2/16/2026 |
| 0.50.0 | 664 | 10/19/2025 |
| 0.41.0 | 16,079 | 9/25/2025 |
| 0.40.0 | 525 | 9/25/2025 |
| 0.39.0 | 1,386 | 2/14/2025 |
| 0.38.0 | 46,983 | 11/22/2024 |
| 0.37.0 | 640 | 10/24/2024 |
| 0.36.0 | 503 | 10/24/2024 |
| 0.35.0 | 5,414 | 10/22/2024 |
| 0.34.0 | 538 | 10/22/2024 |
| 0.33.0 | 1,440 | 8/14/2024 |
| 0.32.0 | 628 | 7/2/2024 |
| 0.31.0 | 11,583 | 6/4/2024 |
| 0.30.0 | 598 | 5/13/2024 |
| 0.29.0 | 636 | 3/20/2024 |
| 0.28.0 | 7,982 | 12/10/2023 |
| 0.26.0 | 671 | 12/9/2023 |
| 0.25.0 | 3,213 | 8/1/2023 |
| 0.24.0 | 869 | 6/20/2023 |