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

"server-request-paym-adjustment"

ipf.payment-adjustment.request.kafka.consumer.restart-settings.max-backoff

"5s"

ipf.payment-adjustment.request.kafka.consumer.restart-settings.max-restarts

5

ipf.payment-adjustment.request.kafka.consumer.restart-settings.max-restarts-within

"10m"

ipf.payment-adjustment.request.kafka.consumer.restart-settings.min-backoff

"1s"

ipf.payment-adjustment.request.kafka.consumer.restart-settings.random-factor

0.25

ipf.payment-adjustment.request.kafka.consumer.topic

"PAYMENT_CANCELLATION_REQUEST"

Property Grouping: ipf.payment-adjustment.response.kafka.producer

Key Description Default Value

ipf.payment-adjustment.response.kafka.producer.kafka-clients.client.id

"server-response-paym-adjustment"

ipf.payment-adjustment.response.kafka.producer.restart-settings.max-backoff

"5s"

ipf.payment-adjustment.response.kafka.producer.restart-settings.max-restarts

5

ipf.payment-adjustment.response.kafka.producer.restart-settings.max-restarts-within

"10m"

ipf.payment-adjustment.response.kafka.producer.restart-settings.min-backoff

"1s"

ipf.payment-adjustment.response.kafka.producer.restart-settings.random-factor

0.25

ipf.payment-adjustment.response.kafka.producer.topic

"PAYMENT_ADJUSTMENT_RESPONSE"

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

"tcp://localhost:61616"

ipf.payment-adjustment.server-connector.jms.consumer-window-size

0

ipf.payment-adjustment.server-connector.jms.failover-timeout

5000

ipf.payment-adjustment.server-connector.jms.receive-timeout

5000

ipf.payment-adjustment.server-connector.jms.request.queue

Queues

"PaymentCancellationRequestQueue"

ipf.payment-adjustment.server-connector.jms.response.queue

"PaymentAdjustmentResponseQueue"

ipf.payment-adjustment.server-connector.jms.server.receive-connector.manualStart

false

ipf.payment-adjustment.server-connector.jms.server.send-connector.manualStart

false

ipf.payment-adjustment.server-connector.jms.session-cache-size

25

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:

  1. MessageComponentValidator: responsible for validating the ISO message

  2. 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.