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
<PackageReference Include="Soenneker.ServiceBus.Receptors.MsTeams" Version="4.0.964" />
<PackageVersion Include="Soenneker.ServiceBus.Receptors.MsTeams" Version="4.0.964" />
<PackageReference Include="Soenneker.ServiceBus.Receptors.MsTeams" />
paket add Soenneker.ServiceBus.Receptors.MsTeams --version 4.0.964
#r "nuget: Soenneker.ServiceBus.Receptors.MsTeams, 4.0.964"
#:package Soenneker.ServiceBus.Receptors.MsTeams@4.0.964
#addin nuget:?package=Soenneker.ServiceBus.Receptors.MsTeams&version=4.0.964
#tool nuget:?package=Soenneker.ServiceBus.Receptors.MsTeams&version=4.0.964
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 | 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
- Hangfire.Core (>= 1.8.25)
- Soenneker.MsTeams.Sender (>= 4.0.1020)
- Soenneker.ServiceBus.Receptor (>= 4.0.2075)
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 |
Update dependency Soenneker.MsTeams.Sender to 4.0.1020 (#1498)