Nuuvify.CommonPack.MftMailbox.Http
3.1.0
See the version list below for details.
dotnet add package Nuuvify.CommonPack.MftMailbox.Http --version 3.1.0
NuGet\Install-Package Nuuvify.CommonPack.MftMailbox.Http -Version 3.1.0
<PackageReference Include="Nuuvify.CommonPack.MftMailbox.Http" Version="3.1.0" />
<PackageVersion Include="Nuuvify.CommonPack.MftMailbox.Http" Version="3.1.0" />
<PackageReference Include="Nuuvify.CommonPack.MftMailbox.Http" />
paket add Nuuvify.CommonPack.MftMailbox.Http --version 3.1.0
#r "nuget: Nuuvify.CommonPack.MftMailbox.Http, 3.1.0"
#:package Nuuvify.CommonPack.MftMailbox.Http@3.1.0
#addin nuget:?package=Nuuvify.CommonPack.MftMailbox.Http&version=3.1.0
#tool nuget:?package=Nuuvify.CommonPack.MftMailbox.Http&version=3.1.0
Adapter HTTPS Mailbox para integração MFT com suporte a:
- upload/download por streaming
- polling de status com backoff
- confirmação ACK/NACK por API
- tratamento resiliente para falhas transientes
Índice
- Quando usar
- Dependências
- Instalação
- Configuração
- Registro no DI
- Exemplo de envio
- Exemplo de status
- Exemplo de ACK/NACK
- Segurança
- Troubleshooting
- Compatibilidade
Quando usar
- Quando o provedor MFT expõe Mailbox via API HTTPS.
- Quando o fluxo exige status assíncrono com polling controlado.
- Quando ACK/NACK é confirmado por endpoint HTTP.
Dependências
- Nuuvify.CommonPack.MftMailbox
- Nuuvify.CommonPack.MftMailbox.Abstraction
- Microsoft.Extensions.Http
Instalação
<PackageReference Include="Nuuvify.CommonPack.MftMailbox.Http" Version="x.x.x" />
Configuração
HttpMftMailboxOptions
- BaseUrl
- UploadPath
- DownloadPath
- ListPath
- StatusPath
- AckNackPath
- BearerToken
- UseMutualTls
- StatusPollingMaxAttempts
- StatusPollingBaseDelay
Registro no DI
using Nuuvify.CommonPack.MftMailbox;
using Nuuvify.CommonPack.MftMailbox.Http;
builder.Services.AddMftMailboxCore();
builder.Services.AddMftMailboxHttp(options =>
{
options.BaseUrl = "https://mft.example.com";
options.UploadPath = "/mailbox/upload";
options.DownloadPath = "/mailbox/download";
options.ListPath = "/mailbox/list";
options.StatusPath = "/mailbox/status";
options.AckNackPath = "/mailbox/acknack";
options.BearerToken = "token-via-secret-provider";
options.StatusPollingMaxAttempts = 10;
options.StatusPollingBaseDelay = TimeSpan.FromSeconds(2);
});
Exemplo de envio
using Nuuvify.CommonPack.MftMailbox.Abstraction.Interfaces;
using Nuuvify.CommonPack.MftMailbox.Abstraction.Models;
public sealed class HttpOutboundService
{
private readonly IMftClientFactory _factory;
public HttpOutboundService(IMftClientFactory factory)
{
_factory = factory;
}
public async Task<TransferItemResult> SendAsync(Stream payload, CancellationToken ct)
{
var client = _factory.CreateTransferClient(MftProtocol.Https);
var envelope = new TransferEnvelope
{
IntegrationKey = "erp-http",
CorrelationId = Guid.NewGuid().ToString("N"),
Protocol = MftProtocol.Https,
Items = new List<TransferItem>
{
new()
{
ItemId = Guid.NewGuid().ToString("N"),
FileName = "orders.json",
ContentFactory = _ => Task.FromResult(payload)
}
}
};
return await client.SendSingleAsync(envelope, ct);
}
}
Exemplo de status
var statusClient = _factory.CreateStatusClient(MftProtocol.Https);
var status = await statusClient.GetStatusAsync("erp-http", "item-01", ct);
Exemplo de ACK/NACK
var ackClient = _factory.CreateAckNackClient(MftProtocol.Https);
await ackClient.AckOrNackAsync(new AckNackCommand
{
IntegrationKey = "erp-http",
CorrelationId = Guid.NewGuid().ToString("N"),
ItemId = "item-01",
FileName = "orders.json",
Protocol = MftProtocol.Https,
Decision = AckNackType.Nack,
Reason = "checksum mismatch"
}, ct);
Segurança
- Use BearerToken obtido de secret manager.
- Se necessário, habilite mTLS na infraestrutura HTTP.
- Não registre payload sensível em logs.
- Restrinja permissões e escopo do token por integração.
Troubleshooting
- 401/403: validar token, escopo e relógio do ambiente.
- Timeout: revisar BaseUrl, proxy, timeout e políticas de retry.
- Polling sem conclusão: ajustar StatusPollingMaxAttempts/base delay e validar endpoint de status.
- Falha de desserialização: validar contrato de resposta do provedor MFT.
Compatibilidade
- Framework alvo: .NET 8
- Dependências principais:
- Nuuvify.CommonPack.MftMailbox
- Nuuvify.CommonPack.MftMailbox.Abstraction
- Microsoft.Extensions.Http
| Product | Versions 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 was computed. 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. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.Extensions.Options (>= 8.0.2)
- Nuuvify.CommonPack.MftMailbox (>= 3.1.0)
- Nuuvify.CommonPack.MftMailbox.Abstraction (>= 3.1.0)
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 |
|---|---|---|
| 3.1.1-preview.140 | 41 | 11/25/2026 |
| 3.1.1-preview.138 | 41 | 11/25/2026 |
| 3.1.1-preview.132 | 46 | 11/25/2026 |
| 3.1.0 | 72 | 11/25/2026 |
| 3.0.1-preview.129 | 49 | 11/25/2026 |
| 3.0.1-preview.123 | 43 | 11/24/2026 |
| 3.0.1-preview.118 | 54 | 11/23/2026 |
| 3.0.1-preview.111 | 53 | 11/23/2026 |
| 3.0.1-preview.103 | 53 | 11/23/2026 |
| 3.0.1-preview.94 | 59 | 11/23/2026 |
| 3.0.0-preview.121 | 48 | 11/24/2026 |
| 2.10.1 | 174 | 10/24/2026 |
| 2.10.0 | 110 | 10/24/2026 |
| 2.9.1 | 125 | 10/24/2026 |
| 2.9.0 | 172 | 8/26/2026 |
| 2.9.0-preview.53 | 72 | 10/23/2026 |
| 2.9.0-preview.50 | 75 | 9/18/2026 |
| 2.9.0-preview.45 | 93 | 8/26/2026 |
| 2.9.0-preview.44 | 88 | 8/26/2026 |
| 2.9.0-preview.43 | 86 | 8/23/2026 |
# Changelog - Nuuvify.CommonPack.MftMailbox.Http
Todas as mudanças notáveis deste pacote serão documentadas neste arquivo.
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-br/1.0.0/),
e este projeto adere ao [Semantic Versioning](https://semver.org/lang/pt-BR/spec/v2.0.0.html).
## [Não Lançado]
## [2.10.1] - 2026-10-24
### Alterado
- Dependências atualizadas na linha compatível com .NET 8: `Microsoft.Extensions.Logging.Abstractions` 8.0.3.
## [2.9.0] - 2026-08-26
### Adicionado
- Adapter HTTPS Mailbox com envio/recebimento streaming, status e ACK/NACK.
### Alterado
- Adicionada opção de ordenação dos itens inbound retornados pelo endpoint de listagem.
- Upload multipart agora pode incluir metadados configuráveis de envelope e item.
### Corrigido
- ReceiveBatchAsync passou a respeitar itens explicitamente informados no envelope, conforme contrato da abstração inbound.