Cosmos.Contabilidad.Mensajeria
0.0.1
dotnet add package Cosmos.Contabilidad.Mensajeria --version 0.0.1
NuGet\Install-Package Cosmos.Contabilidad.Mensajeria -Version 0.0.1
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="Cosmos.Contabilidad.Mensajeria" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cosmos.Contabilidad.Mensajeria" Version="0.0.1" />
<PackageReference Include="Cosmos.Contabilidad.Mensajeria" />
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 Cosmos.Contabilidad.Mensajeria --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cosmos.Contabilidad.Mensajeria, 0.0.1"
#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 Cosmos.Contabilidad.Mensajeria@0.0.1
#: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=Cosmos.Contabilidad.Mensajeria&version=0.0.1
#tool nuget:?package=Cosmos.Contabilidad.Mensajeria&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Cosmos.Contabilidad.Mensajeria
Extensiones de Wolverine para integrarse con el sub-dominio de Contabilidad del ERP Cosmos. Configura la publicación de hechos económicos y la recepción de resultados de contabilización sobre RabbitMQ.
Si solo necesitas los contratos (sin Wolverine), usa el paquete Cosmos.Contabilidad.Contratos.
Instalación
dotnet add package Cosmos.Contabilidad.Mensajeria
Configuración
En las WolverineOptions del servicio productor (OXP, CXC, Tesorería, etc.):
options.HabilitarContabilidad("MiServicio-From-Contabilidad");
Esto configura:
- La publicación de
HechoEconomicoRecibidoal exchange de Contabilidad con Outbox durable. - La suscripción al exchange de Contabilidad para recibir
HechoEconomicoContabilizadoyHechoEconomicoRechazado.
Ejemplo de uso
// Program.cs del sub-dominio productor
builder.Host.UsarWolverineParaComandos(
typeof(IDominioAssemblyMarker).Assembly,
connectionString, "MiSchema",
builder.Environment.IsDevelopment(),
options =>
{
options.HabilitarRabbitMq("RabbitMQ");
options.HabilitarOutbox(serviceName, typeof(IContratosAssemblyMarker).Assembly);
options.HabilitarInbox();
// Una línea para conectarse con Contabilidad
options.HabilitarContabilidad("MiServicio-From-Contabilidad");
}
);
// En el handler que causa el hecho económico
using Cosmos.Contabilidad.Contratos.ServicioDeTraduccion.Eventos;
using Cosmos.Contabilidad.Contratos.ServicioDeTraduccion.Modelos;
var lineas = new List<LineaTraduccion>
{
new(
new ConceptoEconomico("gasto", "HONORARIOS", 1_000_000m),
new DatosTercero("Nike", "NIT", "900123456"),
new ContextoTransaccion("causacion_gasto", "COSMOS-SAS", Moneda.COP, DateTime.UtcNow),
new Origen("oxp-comercio-123/causada", "OXP", "FAC-5678", null),
"VTA-001")
};
await publicEventSender.PublishAsync(new HechoEconomicoRecibido(lineas));
// Consumer para recibir el resultado de contabilización [R17]
public class HechoContabilizadoConsumer
: ICommandHandlerAsync<HechoEconomicoContabilizado>
{
public Task HandleAsync(HechoEconomicoContabilizado evento, CancellationToken ct)
{
// evento.ReferenciaOrigen → identifica la transacción
// evento.ReferenciaDestino → consecutivo del asiento en SincoA&F
return Task.CompletedTask;
}
}
Método de extensión
| Método | Uso |
|---|---|
HabilitarContabilidad(nombreCola) |
Para sub-dominios productores. Publica hechos económicos y recibe resultados. |
Dependencias
| Paquete | Propósito |
|---|---|
Cosmos.Contabilidad.Contratos |
Contratos del sub-dominio de Contabilidad. |
WolverineFx.RabbitMQ |
Transporte RabbitMQ para Wolverine. |
Licencia
Software propietario © 2026 Sincosoft. Todos los derechos reservados.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Cosmos.Contabilidad.Contratos (>= 0.0.1)
- WolverineFx.RabbitMQ (>= 5.18.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 |
|---|---|---|
| 0.0.1 | 118 | 4/24/2026 |