Nexttag.Queue.RabbitMq 1.0.0

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

Nexttag.Libs

Bibliotecas NuGet reutilizaveis da Nexttag para .NET 10.

Pacotes

Pacote Descricao
Nexttag.Common Tipos base: Result pattern, BaseEntity, PagedResult
Nexttag.Common.Multitenancy Multi-tenancy: TenantProvider, TenantEntity, middleware
Nexttag.Auth Interfaces de autenticacao: IJwtService, ICurrentUserProvider
Nexttag.Auth.Jwt Implementacao JWT com cookie HttpOnly
Nexttag.Auth.MagicLink Login passwordless: magic link OU codigo OTP, single-use, hash SHA-256
Nexttag.Auth.NextAuth Client HTTP para NextAuth API
Nexttag.Communication Interfaces: email, SMS, notificacoes
Nexttag.Communication.Email Implementacao SendGrid
Nexttag.Communication.Email.Postmark Implementacao Postmark
Nexttag.Communication.Queue RabbitMQ publisher/consumer
Nexttag.Storage Interface de storage
Nexttag.Storage.R2 Implementacao Cloudflare R2
Nexttag.Api.Middleware Exception handler com ProblemDetails
Nexttag.Observability OpenTelemetry para Grafana/Loki

Uso

dotnet add package Nexttag.Common
dotnet add package Nexttag.Auth.Jwt
dotnet add package Nexttag.Common.Multitenancy
// Program.cs
builder.Services.AddNexttagJwtAuth(builder.Configuration);

// appsettings.json
{
  "Jwt": {
    "Key": "sua-chave-secreta",
    "Issuer": "meu-app",
    "Audience": "meu-app",
    "ExpirationMinutes": "480",
    "CookieName": "meu_token"
  }
}
// Program.cs — registra IMagicLinkService + suas dependências (Store, Renderer)
builder.Services.AddNexttagMagicLink<MeuStoreEf, MeuRendererPostmark>(builder.Configuration);

// appsettings.json
{
  "MagicLink": {
    "TokenLengthBytes": 32,
    "CodeLength": 6,
    "ExpirationMinutes": 15,
    "MaxRequestsPerHour": 5
  }
}

// Endpoint: solicitar link
[HttpPost("api/auth/magic-link")]
public async Task<IActionResult> Solicitar([FromBody] dynamic body, IMagicLinkService svc)
{
    var r = await svc.SolicitarAsync((string)body.email, MagicLinkModo.Link,
        new Dictionary<string, string> { ["redirect"] = "/painel" });
    if (!r.IsSuccess) return Problem(detail: r.Error!.Message, statusCode: r.Error.StatusCode);
    return Ok(new { ok = true, expiraEm = r.Value!.ExpiraEm });
}

// Endpoint: consumir token (verifica e gera JWT)
[HttpGet("api/auth/verify")]
public async Task<IActionResult> Verificar([FromQuery] string token, IMagicLinkService svc, IJwtService jwt)
{
    var r = await svc.ConsumirAsync(token);
    if (!r.IsSuccess) return Problem(detail: r.Error!.Message, statusCode: r.Error.StatusCode);

    // Crie/recupere o usuário e gere o JWT (cookie HttpOnly via Nexttag.Auth.Jwt)
    var token = jwt.GerarToken(usuario.Id, r.Value!.Email, usuario.Nome);
    Response.Cookies.Append("ela_token", token, new CookieOptions { HttpOnly = true, Secure = true });
    return Ok(new { ok = true });
}

Multi-tenancy

// Program.cs
builder.Services.AddMultitenancy();

// Apos UseAuthentication()
app.UseMultitenancy(claimName: "fornecedorId");

// No controller
public class MeuController(ITenantProvider tenant) : ControllerBase
{
    [HttpGet]
    public IActionResult Get() => Ok(new { tenantId = tenant.TenantId });
}

Result pattern

public Result<Usuario> Buscar(Guid id)
{
    var user = _db.Usuarios.Find(id);
    if (user is null)
        return new AppError("not_found", "Usuario nao encontrado", 404);
    return user;
}

Build

dotnet build
dotnet test
dotnet pack
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
1.0.0 124 6/7/2026