-
Notifications
You must be signed in to change notification settings - Fork 18
Architecture Overview
phoss-ap is an open-source Peppol Access Point built on phase4 and Spring Boot.
| Component | Technology | Purpose |
|---|---|---|
| AS4 Engine | phase4 | AS4 message sending and receiving |
| Database | PostgreSQL | Persistent storage of transactions, metadata, and reporting data |
| API | Spring Boot REST | Inbound API for triggering sends and reporting |
| Forwarding | Pluggable (per instance) | Delivering received documents to the Receiver Backend |
| Retry | Customizable Java interfaces | Automatic retry of failed sends and failed forwarding |
| Notifications | Generic Java interface | Alerting on permanent failures |
| Reporting | peppol-reporting | Peppol TSR/EUSR generation |
C1 (Sender) --> C2 (Sender AP) --> C3 (Receiver AP) --> C4 (Receiver)
phoss-ap operates exclusively on the C2-to-C3 boundary. It does not implement C1 or C4 functionality. The systems that interact with the AP on either side are:
- Sender Backend: An internal system within C2 that submits documents to the AP for outbound transmission.
- Receiver Backend: An internal system within C3 that receives documents from the AP after inbound reception.
[Sender Backend] --> [phoss-ap (C2)] --AS4--> [Remote AP (C3)]
[Remote AP (C2)] --AS4--> [phoss-ap (C3)] --> [Receiver Backend]
The AP accepts outbound documents from the Sender Backend via its API in two forms:
- Raw business document + metadata: The AP creates the SBDH envelope. The Sender Backend provides sender ID, receiver ID, document type ID, process ID, and C1 country code as API parameters.
- Pre-built SBD: The Sender Backend provides a complete Standard Business Document (with SBDH). All metadata (including C1 country code) is extracted from the SBDH.
Received documents are forwarded to the Receiver Backend. The forwarding mode is configured per AP instance (one mode per deployment):
- HTTP POST (async reporting): Document is POSTed to the Receiver Backend. The Receiver Backend calls the reporting API asynchronously later.
- HTTP POST (sync reporting): Document is POSTed to the Receiver Backend. The Receiver Backend responds synchronously with the C4 country code, and the AP triggers reporting immediately.
- S3 + link forwarding: Document is stored in S3, and a link/reference is forwarded to the Receiver Backend. Reporting is asynchronous.
- SFTP: Document is uploaded via SFTP. Reporting is asynchronous.
AS4 duplicate detection is configurable:
- Reject: Duplicate messages (same AS4 Message ID) are rejected at the AS4 level.
- Store and flag: Duplicates are stored in the DB but flagged as duplicates.
Transactions that are fully completed successfully are moved from the primary DB tables to backup/archive tables to prevent table bloat. Failed transactions remain in the primary tables.
A generic Java interface is provided for failure notifications. Concrete implementations are deployment-specific (e.g., email, Slack, monitoring system webhook). Notification triggers include:
- Permanent sending failure (max retries exhausted)
- Permanent forwarding failure on the receiving side
It is appreciated if you star the GitHub project if you like it.
Donation link: https://paypal.me/PhilipHelger
- Home
- News and noteworthy
- Running phoss AP
- Architecture Overview
- API Specification
- Configuration Properties
- Code Lists
- Database Design Notes
- Maven Module Structure
- Runtime Extensions
- OpenTelemetry Integration
- Security Considerations
- Peppol Specifics
- Testing Without Peppol Network
- Known Users
- Migrating from phase4-peppol-standalone
- Contributing