AzureDotnetDev.Funcky 1.0.4

dotnet add package AzureDotnetDev.Funcky --version 1.0.4
                    
NuGet\Install-Package AzureDotnetDev.Funcky -Version 1.0.4
                    
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="AzureDotnetDev.Funcky" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AzureDotnetDev.Funcky" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="AzureDotnetDev.Funcky" />
                    
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 AzureDotnetDev.Funcky --version 1.0.4
                    
#r "nuget: AzureDotnetDev.Funcky, 1.0.4"
                    
#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 AzureDotnetDev.Funcky@1.0.4
                    
#: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=AzureDotnetDev.Funcky&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=AzureDotnetDev.Funcky&version=1.0.4
                    
Install as a Cake Tool

AzureDotnetDev.Funcky

Helpers and extensions to reduce boilerplate when building Azure Functions on .NET 8.0 and .NET 9.0. Focused on clean DI, simple configuration, and safe defaults.

Features

  • Service Bus topic-to-queue forwarder as a single call
  • Attribute-based binding for topic-to-queue forwarders
  • Assembly scanning to automatically bind all topic-to-queue forwarders in a given assembly
  • Async-first API with a convenient sync wrapper
  • Flexible configuration via connection strings or an explicit TokenCredential

Install

dotnet add package AzureDotnetDev.Funcky

NuGet package includes XML docs, README, and symbols.

Quick start

Minimal example with .NET isolated Functions:

using Microsoft.Extensions.Hosting;
using AzureDotnetDev.Funcky.Extensions.ServiceBus;

var host = new HostBuilder()
    .ConfigureFunctionsWorkerDefaults()
    .Build();

// Ensures a subscription on "orders" forwards to queue "billing"
await host.UseTopicBoundQueueAsync("orders", "billing");

await host.RunAsync();

Attribute-based binding

Use TopicBoundQueueAttribute to declare a topic-to-queue forwarder directly on a function method and bind all such attributes at startup.

using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Hosting;
using AzureDotnetDev.Funcky.Extensions.ServiceBus;

public class MyFunctions
{
    [Function("ProcessOrder")]
    [TopicBoundQueue("%OrdersTopic%", "%BillingQueue%", SubscriptionName = "%BillingSubscription%", Connection = "ServiceBusConnection", AutoCreateEntities = true, AutoDeleteOnIdle = "7d")]
    public Task Run([ServiceBusTrigger("%BillingQueue%", Connection = "ServiceBusConnection")] string body)
        => Task.CompletedTask;
}

var host = new HostBuilder()
    .ConfigureFunctionsWorkerDefaults()
    .Build();

host.UseTopicBoundQueuesFromAssemblyContaining<MyFunctions>();
await host.RunAsync();
  • Placeholders like %Key% resolve via IConfiguration from connection strings or standard configuration keys.
  • SubscriptionName defaults to QueueName if omitted.
  • Connection accepts either a connection string key or a fully qualified namespace key.
  • Namespace-based configuration requires the explicit TokenCredential scanner overload.
  • When AutoCreateEntities is true, missing topic/queue/subscription are created; optional AutoDeleteOnIdle supports TimeSpan formats such as 7.00:00:00, Xd such as 7d, or ISO-8601 day values such as P7D.

Configuration modes

You can configure the Service Bus administration client in three ways.

  1. Connection string

App settings key defaults to ServiceBusConnection. Override by passing your own key name.

await host.UseTopicBoundQueueAsync("mytopic", "myqueue", "ServiceBusConnection");

App settings example:

{
  "ConnectionStrings": {
    "ServiceBusConnection": "Endpoint=sb://your-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=..."
  }
}
  1. Attribute scanning with fully qualified namespace and explicit credential

If the key name ends with __fullyQualifiedNamespace or :fullyQualifiedNamespace, the value is treated as an FQDN such as your-ns.servicebus.windows.net. If a regular key is missing, an alternate key with either suffix is also checked.

using Azure.Identity;
using AzureDotnetDev.Funcky.Extensions.ServiceBus;

var credential = new DefaultAzureCredential();

var host = new HostBuilder()
    .ConfigureFunctionsWorkerDefaults()
    .Build()
    .UseTopicBoundQueuesFromAssemblyContaining<MyFunctions>(credential);

await host.RunAsync();

App settings example:

{
  "ConnectionStrings": {
    "ServiceBusConnection__fullyQualifiedNamespace": "your-ns.servicebus.windows.net"
  }
}
  1. Direct custom credential

Bring your own TokenCredential and FQDN explicitly when not using attributes:

using Azure.Identity;
using AzureDotnetDev.Funcky.Extensions.ServiceBus;

var credential = new DefaultAzureCredential();
await host.UseTopicBoundQueueAsync(
    topicName: "topic",
    queueName: "queue",
    credential: credential,
    fullyQualifiedNamespace: "your-ns.servicebus.windows.net");

API surface

// Async-first
Task<IHost> UseTopicBoundQueueAsync(this IHost host, string topicName, string queueName, string connectionStringName = "ServiceBusConnection");
Task<IHost> UseTopicBoundQueueAsync(this IHost host, string topicName, string queueName, TokenCredential credential, string fullyQualifiedNamespace);

// Convenience sync wrappers
IHost UseTopicBoundQueue(this IHost host, string topicName, string queueName, string connectionStringName = "ServiceBusConnection");
IHost UseTopicBoundQueue(this IHost host, string topicName, string queueName, TokenCredential credential, string fullyQualifiedNamespace);

// Attribute + assembly scanning
IHost UseTopicBoundQueuesFromAssemblyContaining<TMarker>(this IHost host);
IHost UseTopicBoundQueuesFromAssemblyContaining<TMarker>(this IHost host, TokenCredential credential);
IHost UseTopicBoundQueuesFromAssemblies(this IHost host, params Assembly[] assemblies);
IHost UseTopicBoundQueuesFromAssemblies(this IHost host, TokenCredential credential, params Assembly[] assemblies);

// Attribute
sealed class TopicBoundQueueAttribute(string topicName, string queueName)
{
    string TopicName { get; }                  // supports "%Key%" placeholders
    string QueueName { get; }                  // supports "%Key%" placeholders
    string? SubscriptionName { get; set; }     // defaults to QueueName
    string? Connection { get; set; }           // connection string key or FQDN key
    bool AutoCreateEntities { get; set; }      // default: false
    string? AutoDeleteOnIdle { get; set; }     // e.g., "7d", "7.00:00:00", "P7D"
}

Notes and requirements

  • When using credentials instead of a connection string, the principal must have permissions to manage Service Bus entities, such as Azure Service Bus Data Owner.
  • If namespace-based configuration is used without a credential overload, the library throws a clear InvalidOperationException.
  • The topic and queue must already exist unless AutoCreateEntities is true.
  • Topic subscriptions require Azure Service Bus Standard or higher.
  • Forwarding requires both entities in the same namespace.

Target frameworks

  • .NET 8.0
  • .NET 9.0

Versioning

  • Semantic Versioning (SemVer): MAJOR.MINOR.PATCH

License

  • MIT

Contributing

Issues and PRs welcome. Please keep changes small, focused, and well-tested.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 169 8/10/2026
1.0.3 107 8/10/2026
1.0.2 125 8/10/2026
1.0.1 342 8/13/2025

Initial release of Azure Functions helpers for DI and Service Bus.