Soenneker.ServiceBus.Receptors.MsTeams 4.0.964

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.ServiceBus.Receptors.MsTeams

Consumes messages from the msteams Azure Service Bus queue, deserializes MsTeamsMessage bodies, and hands them to IMsTeamsSender through Hangfire.

Installation

dotnet add package Soenneker.ServiceBus.Receptors.MsTeams

Prerequisites

Configure Azure:ServiceBus:ConnectionString. The credential needs queue-management and receive permissions because initialization creates the msteams queue when absent and starts a processor.

Configure Hangfire storage and run a Hangfire server. The registrar adds IMsTeamsSender as a scoped service so Hangfire can resolve it for each job.

Register and start

using Soenneker.ServiceBus.Receptors.MsTeams.Abstract;
using Soenneker.ServiceBus.Receptors.MsTeams.Registrars;

services.AddMsTeamsReceptorAsSingleton();

Registration alone does not start processing. Resolve and initialize the singleton receptor during application startup:

IMsTeamsReceptor receptor =
    services.GetRequiredService<IMsTeamsReceptor>();

await receptor.Init(cancellationToken);

Dispose the receptor during shutdown so its Service Bus processor stops cleanly.

Message contract

The Service Bus body must be a JSON representation of Soenneker.Messages.MsTeams.MsTeamsMessage. Newtonsoft.Json is used because the Adaptive Card model used by the message has a Newtonsoft converter.

After deserialization, the receptor enqueues this Hangfire call:

IMsTeamsSender.SendMessage(
    message,
    CancellationToken.None)

The Service Bus ApplicationProperties["type"] value is accepted by the base receptor but is not used to choose a Teams DTO or sender path in this implementation.

The job intentionally receives CancellationToken.None rather than the short-lived Service Bus delivery token. Hangfire manages cancellation for the eventual background execution.

Delivery behavior

The Service Bus message is completed only after its body is deserialized and Hangfire accepts the job. Deserialization or enqueue failures flow back to the processor, leaving the broker message unsettled for retry and eventual dead-lettering according to queue policy.

Delivery is at least once across the handoff. If Hangfire persists a job but Service Bus completion fails, another delivery can enqueue the same Teams message again. Use a stable message identifier or another idempotency mechanism when duplicate webhook posts are unacceptable.

Message bodies can contain webhook URLs and user-supplied card content. This receptor does not write failed bodies to its own error log; apply the same care to upstream Service Bus logging and Hangfire argument storage.

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.

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
4.0.964 0 10/2/2026
4.0.963 0 10/2/2026
4.0.962 54 10/1/2026
4.0.961 57 10/1/2026
4.0.960 74 9/30/2026
4.0.959 71 9/30/2026
4.0.958 76 9/29/2026
4.0.957 65 9/29/2026
4.0.956 71 9/29/2026
4.0.955 69 9/29/2026
4.0.954 84 9/28/2026
4.0.953 94 9/27/2026
4.0.952 93 9/26/2026
4.0.950 98 9/25/2026
4.0.949 92 9/25/2026
4.0.948 86 9/25/2026
4.0.947 89 9/25/2026
4.0.946 85 9/25/2026
4.0.945 87 9/25/2026
4.0.944 88 9/25/2026
Loading failed

Update dependency Soenneker.MsTeams.Sender to 4.0.1020 (#1498)