Integration
The current integration patterns supported for the three core components that make up the solution are:
An additional integration point to consider is how the Persistent Scheduler communicates with the Payment Releaser. An alternative to the options above is to have them communicate over Kafka. This allows the Persistent Scheduler to be configured as a standalone application. Details on how to integrate the Persistent Scheduler and Payment Releaser via Kafka is detailed below in Kafka between Scheduler and Releaser.
Embedded
To embed one of the components into an application you typically follow three steps:
-
declare the dependency in your pom.xml
-
define any Spring Beans that may be required
-
configure
Each of these steps is described in the individual component 'getting-started' documentation.
Expose and Use HTTP API
Each of the core components in this solution have the option to expose an HTTP API. The steps to set this up are described in the individual component documentation.
-
Payment Warehouse: Exponer HTTP Controlador
-
Payment Releaser: Exponer HTTP Controlador
-
Persistent Scheduler: Exponer HTTP Controlador
Client Library
To interact with the HTTP API exposed for each of the core components, there is a client library provided. The steps to set this up are described in the individual component documentation.
-
Payment Warehouse: Biblioteca del Cliente
-
Payment Releaser: Biblioteca del Cliente
-
Persistent Scheduler: Biblioteca del Cliente
Custom API Consumer
Instead of using the client library, you can create your own custom API consumer. You will need to refer to the API documentation of each core component to develop your own consumer:
-
Payment Warehouse: Almacén de Pagos OpenAPI Especificación
-
Payment Releaser: Liberador de Pagos IPF OpenAPI Especificación
-
Persistent Scheduler: Persistent Scheduler OpenAPI Especificación
Kafka between Scheduler and Releaser
When Scheduling releases using the Persistent Scheduler via HTTP, you can bring in additional modules to enable the execution of a command via Kafka.
The order of events is as follows:
-
The Persistent Scheduler receives a request via HTTP
-
When it is the scheduled date-time, the Persistent Scheduler will publish a message onto Kafka.
-
The Payment Releaser will subscribe to the same Kafka topic and consume the message published in step 2
-
The Payment Releaser will release the specific Unit Of Work ID.
The Persistent Scheduler can be configured to publish to Kafka as described in Independiente Scheduler.
The Payment Releaser will be your receiving system and can be configured to consume these messages by following the steps described in Cómo activar el Releaser desde Persistent Scheduler vía Kafka.