Franz.Common.Annotations
3.0.0
dotnet add package Franz.Common.Annotations --version 3.0.0
NuGet\Install-Package Franz.Common.Annotations -Version 3.0.0
<PackageReference Include="Franz.Common.Annotations" Version="3.0.0" />
<PackageVersion Include="Franz.Common.Annotations" Version="3.0.0" />
<PackageReference Include="Franz.Common.Annotations" />
paket add Franz.Common.Annotations --version 3.0.0
#r "nuget: Franz.Common.Annotations, 3.0.0"
#:package Franz.Common.Annotations@3.0.0
#addin nuget:?package=Franz.Common.Annotations&version=3.0.0
#tool nuget:?package=Franz.Common.Annotations&version=3.0.0
Franz.Common.Annotations
Attribute metadata for declaring Kafka topic requirements on application types.
Overview
Attribute metadata for declaring Kafka topic requirements on application types.
Responsibilities
This package currently exposes RequiredKafkaTopicAttribute. It is metadata only: it does not discover attributes, validate runtime configuration, create Kafka topics, or register producers and consumers. Those behaviors belong to the consuming package or application.
Installation
dotnet add package Franz.Common.Annotations
Attribute contract
The attribute can be applied once to a class. It supports parameterless named-property configuration and two positional constructors.
using Franz.Common.Annotations;
// Explicit topic metadata.
[RequiredKafkaTopic(Topic = "orders", DeadLetterTopic = "orders-dlq")]
public sealed class OrderConsumer
{
}
// Format metadata for a consumer-specific convention.
[RequiredKafkaTopic("{0}-in")]
public sealed class CustomerConsumer
{
}
// Format plus entity name; Topic is materialized by the constructor.
[RequiredKafkaTopic("{0}-in", "Customers")]
public sealed class CustomerEventsConsumer
{
}
Properties
| Member | Meaning |
|---|---|
Topic |
Explicit or constructor-derived topic name. |
Format |
Topic format/convention metadata. |
DeadLetterTopic |
Optional dead-letter topic metadata. |
The positional constructors reject a null format. The two-argument constructor formats the supplied pattern with the entity name and stores the resulting value in Topic. The one-argument constructor stores the pattern in Format; it does not resolve a topic name itself.
Consumption and validation
A consumer of this metadata must define its own interpretation rules, including how it handles missing values, format placeholders, invalid topic names, and dead-letter topic provisioning. Do not assume that decorating a class triggers validation automatically.
Package boundaries
This assembly contains the attribute contract only. Kafka provisioning and runtime behavior are implemented by the relevant messaging packages and host application.
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Franz.Common.Annotations:
| Package | Downloads |
|---|---|
|
Franz.Common.Messaging.Kafka
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 114 | 11/10/2026 |
| 2.3.4 | 369 | 11/1/2026 |
| 2.3.3 | 332 | 10/28/2026 |
| 2.3.2 | 128 | 10/27/2026 |
| 2.3.1 | 193 | 10/26/2026 |
| 2.3.0 | 207 | 7/21/2026 |
| 2.2.19 | 168 | 7/19/2026 |
| 2.2.18 | 158 | 7/19/2026 |
| 2.2.17 | 166 | 7/12/2026 |
| 2.2.16 | 178 | 7/2/2026 |
| 2.2.15 | 162 | 6/29/2026 |
| 2.2.14 | 160 | 6/29/2026 |
| 2.2.13 | 172 | 6/29/2026 |
| 2.2.12 | 166 | 6/28/2026 |
| 2.2.11 | 160 | 6/28/2026 |
| 2.2.10 | 168 | 6/28/2026 |
| 2.2.9 | 162 | 6/28/2026 |
| 2.2.8 | 165 | 6/28/2026 |
| 2.2.7 | 164 | 6/7/2026 |
| 2.2.6 | 169 | 6/6/2026 |