
AS2 in .NET Without Separate Java Gateway: Native EDI Exchange Directly in Application Routes
redb.Route.AS2 introduces native AS2 protocol support for .NET applications, eliminating the need for separate commercial gateways or Java-based servers like OpenAS2. The library integrates AS2 handling as a standard step in Apache Camel-style routes, allowing signed and encrypted S/MIME exchanges with partners such as Walmart directly within a single .NET process. It supports both synchronous and asynchronous MDN receipts for non-repudiation, using MimeKit and Bouncy Castle for cryptography. Developers can configure partners via As2ConnectionFactory objects that define certificates, AS2 identifiers, algorithms, and MDN modes. The solution handles X12 and EDIFACT documents with compression, signing, and encryption while exposing metadata like MIC values and signature validation results to the routing pipeline. This approach consolidates deployment, observability, and processing compared to external gateways or JVM processes.
HabrAug 12, 2026Translated from Russian