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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Franz.Common.Annotations" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.Annotations" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Annotations" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Franz.Common.Annotations --version 3.0.0
                    
#r "nuget: Franz.Common.Annotations, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Franz.Common.Annotations@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Franz.Common.Annotations&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Annotations&version=3.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
Loading failed