BP-Switch: Message forwarding

BP-Switch icon

Introduction

In this tutorial we'll present BP-Switch feature that helps us to set up a simple message forwarding without touching the message. This can be handy when you need to route your messaging traffic through the BP-Node which usually stands on a crossroad of multiple network domains. In such a case BP-Node can receive a message on one connection (and settings), unwrap it and forward to another connection with a different configuration (e.g. TLS).

Components needed

In this scenario, following BP-Node components will be used:

  • NbyteHeaderTCP (for downlink and uplink)

Downlink configuration

The first thing we'll need is to create the listening connection, which will serve as the entry point for receiving our messages. In our scenario a component called NbyteHeaderTCP class will be configured.

Open your BP-UI and navigate to Components.  There click the green button which says "Add Component". From the Class options available pick the bp::eftlab::node::ipc::NbyteHeaderTCP and name it: Downlink.

When clicking the Add button new options will appear, related to the class selected. Fill in the following values:

  • Label: Downlink
  • Description: Feel free to use this feel for your notes about this connection (purpose, contact details)
  • Message Destination: d3ee5dde-fca3-409a-a092-f82fa438c6c6 (that's the target NbyteHeaderTCP Uplink component ID, will fill that later as we have the Uplink's id)
  • Message Type: Uplink - this configuration is irrelevant in this scenario, but providing some sensible value here allows further message tracing
  • Message priority: 1
  • Record On-demand Connection Events: False
  • Plugins: <none>
  • Connections: <none>

Click the Save button.

Add a plugin

No we need to add a plugin which will strip originator connection information so message can be processed by another connection.

Click "Add Plugin" button.

Pick the "bp::eftlab::node::ipc::plugins::SingleConnectionForMessageExchange".

Click Save.

Create a connection

Now we can add a connection. A connection is the actual entry point so we need to fill the IP and port on which the BP-Node will be listening.

Press the “Add Connection” button.

Fill in the form with following connection values:

  • Enabled: True (ON)
  • Server: True
  • Local Address: 0.0.0.0 - so we will listen on all interfaces
  • Local Port: 7002
  • Priority: 0
  • Nr Header Bytes: 2 - this depends on your configuration, usually there are 2 header bytes that do not contain the length of the header, just the length of the following message data
  • Header Length Included In Length: False
  • Postilion Style Extended Length: False
  • Big Endian: True
  • Connect On Demand: False
  • Disconnect After Response: False
  • Keep Alive Enabled: True
  • Idle Timeout (seconds): 0
  • Write Timeout (seconds): 0
  • Max Connections: 0
  • SSL Enabled: False

Save the configuration changes by clicking the "Save" button.

Note the Component Id (8b98e582-9c3c-4023-a8e3-88336743b64f) as it will be needed for further configuration.

Uplink

We also need the target connection - a client which will connect to the acquirer, for this we'll use the NbyteHeaderTCP component again.

Open the components menu and add a new NbyteHeaderTCP component (bp::eftlab::node::ipc::NbyteHeaderTCP).

Select the bp::eftlab::node::ipc::NbyteHeaderTCP component class and name the new component as: Uplink

Save the component.

Fill the following:

  • Label: Uplink
  • Message Destination: 8b98e582-9c3c-4023-a8e3-88336743b64f (the Downlink NbyteHeaderTCP component's ID, see above)
  • Message Type: Downlink - this configuration is irrelevant again, but as per Downlink configuratio, providing some sensible value here will allow further message tracing
  • Message Priority: 0
  • Record On-demand Connection Events: False
  • Plugins: <none>
  • Connections: <none>

Click Save.

Add a plugin

Click "Add Plugin" button.

Pick the "bp::eftlab::node::ipc::plugins::SingleConnectionForMessageExchange".

Click Save.

Create a connection

Click "Add Connection" button.

Set Connection values as followed:

  • Enabled: True (ON)
  • Server: False
  • Remote Address: 127.0.0.1  - change this value appropriately to your Host IP address
  • Local Port: 7011 - change appropriately to your Host port
  • Priority: 0
  • Nr Header Bytes: 2
  • Header Length Included In Length: False
  • Postilion Style Extended Length: False
  • Big Endian: True
  • Connect On Demand: False
  • Disconnect After Response: False
  • Keep Alive Enabled: True
  • Idle Timeout (seconds): 0
  • Write Timeout (seconds): 0
  • Connect Timeout (seconds): 0
  • Max Connections: 0
  • SSL Enabled: False

Save the component.

Note the Component Id (d3ee5dde-fca3-409a-a092-f82fa438c6c6) and return back to previously created Downlink component and fill it there as the "Message Destination: d3ee5dde-fca3-409a-a092-f82fa438c6c6".

Save the Downlink component.

Now any of the incoming messages on port 7002 is forwarded to 127.0.0.1 port 7011 or any IP and port according to your choice, you may also extend this to force tho BP-Node uplink to use SSL connection etc. 

 

Summary

In this tutorial, we went through a part of the easy message forwarding functionality for EFTlab's BP-Switch.

BP-Tools

BP-Tools is a set of freeware applications for EFT testing, benchmarking and transaction service development.

See more...

Download...

Download Flyer...

BP-Sim

The Babylon Payments Simulator (BP-Sim) is a family of highly efficient regression and stress testing tools, designed for deployment in development and pre-production environments. BP-Sim allows users to perform an extensive range of tests across the chain of payment services.

See more...

Download Flyer...

BP-Processing

The Babylon Payments Processing Suite(BP-Processing) is a suite of EFTlab's products for realtime payment transaction processing and authorisation.

See more...