Setting up the Receiving Application
The 'receiving application' is the one receiving requests from, and sending responses to, your 'sending application'. The 'receiving application' is doing the payment adjustments.
Connectors
To receive requests from, and send responses to, your 'sending application', you can wire in Send and Receive connectors for your chosen transaport. The connectors can be wired in as described in this section.
The connectors should be configured above the default configuration by consulting the Connector documentation.
Kafka
To communicate via Kafka, you will need to bring the following dependency into your 'receiving application'.
<dependency>
<groupId>com.iconsolutions.ipf.payments.adjustment</groupId>
<artifactId>payment-adjustment-server-connector-kafka</artifactId>
</dependency>
This brings in a SendConnector and a ReceiveConnector with default configuration, as shown below. In addition to the below defaults, they’ll also have all the standard Kafka Connector default configurations. To customise the configuration, please consult the Connector documentation.
Property Grouping: ipf.payment-adjustment.request.kafka.consumer
| Key | Description | Default Value |
|---|---|---|
ipf.payment-adjustment.request.kafka.consumer.kafka-clients.group.id |
|
|
ipf.payment-adjustment.request.kafka.consumer.restart-settings.max-backoff |
|
|
ipf.payment-adjustment.request.kafka.consumer.restart-settings.max-restarts |
|
|
ipf.payment-adjustment.request.kafka.consumer.restart-settings.max-restarts-within |
|
|
ipf.payment-adjustment.request.kafka.consumer.restart-settings.min-backoff |
|
|
ipf.payment-adjustment.request.kafka.consumer.restart-settings.random-factor |
|
|
ipf.payment-adjustment.request.kafka.consumer.topic |
|
Property Grouping: ipf.payment-adjustment.response.kafka.producer
| Key | Description | Default Value |
|---|---|---|
ipf.payment-adjustment.response.kafka.producer.kafka-clients.client.id |
|
|
ipf.payment-adjustment.response.kafka.producer.restart-settings.max-backoff |
|
|
ipf.payment-adjustment.response.kafka.producer.restart-settings.max-restarts |
|
|
ipf.payment-adjustment.response.kafka.producer.restart-settings.max-restarts-within |
|
|
ipf.payment-adjustment.response.kafka.producer.restart-settings.min-backoff |
|
|
ipf.payment-adjustment.response.kafka.producer.restart-settings.random-factor |
|
|
ipf.payment-adjustment.response.kafka.producer.topic |
|
JMS
To communicate via JMS, you will need to bring the following dependency into your 'receiving application'.
<dependency>
<groupId>com.iconsolutions.ipf.payments.adjustment</groupId>
<artifactId>payment-adjustment-server-connector-jms</artifactId>
</dependency>
This brings in a SendConnector and a ReceiveConnector with default configuration, as shown below. In addition to the below defaults, they’ll also have all the standard JMS Connector default configurations. To customise the configuration, please consult the Connector documentation.
Property Grouping: ipf.payment-adjustment.server-connector.jms
| Key | Description | Default Value |
|---|---|---|
ipf.payment-adjustment.server-connector.jms.broker.url |
|
|
ipf.payment-adjustment.server-connector.jms.consumer-window-size |
|
|
ipf.payment-adjustment.server-connector.jms.failover-timeout |
|
|
ipf.payment-adjustment.server-connector.jms.receive-timeout |
|
|
ipf.payment-adjustment.server-connector.jms.request.queue |
Queues |
|
ipf.payment-adjustment.server-connector.jms.response.queue |
|
|
ipf.payment-adjustment.server-connector.jms.server.receive-connector.manualStart |
|
|
ipf.payment-adjustment.server-connector.jms.server.send-connector.manualStart |
|
|
ipf.payment-adjustment.server-connector.jms.session-cache-size |
|
HTTP
To receive requests via HTTP, you will need to bring the following dependency into your 'receiving application'.
<dependency>
<groupId>com.iconsolutions.ipf.payments.adjustment</groupId>
<artifactId>payment-adjustment-server-connector-http</artifactId>
</dependency>
This brings in an HTTP controller that will receive adjustment requests and wires in an HTTP Receive Flow.
The wired-in HTTP Receive Flow has no configuration provided over-and-above the default configuration provided by the Framework.
If you want to override any configuration, then you can add the configuration properties and values to the configuration path of ipf.payment-adjustment.httpconfig.receive-flow.
Please consult the HTTP Receiving Flow documentation for available configurable properties.
Request Handling
The 'receiving application' has a ReceiveHandler wired in as part of the dependency you imported for integration.
The ReceiveHandler has dependencies on other Spring Beans, some are injected already and some need to be injected.
The Spring Beans that need to be injected are:
-
MessageComponentValidator: responsible for validating the ISO message -
PaymentAdjustmentPort: responsible for processing the adjustment request. This is called following validation.
Once you have injected all the necessary Spring Beans, you can configure the validators as described on the Validation page.