Cluster Configuration

About this task

The FIFO messaging system requires an external clustered JMS provider to allow proper execution and fail over in a clustered configuration. An out of the box configuration for ActiveMQ is provided to streamline this deployment.

You must ensure that you have downloaded and installed the correct software jars for ActiveMQ. For more information on installing ActiveMQ client jars in Sterling B2B Integrator, see the Installing JMS Jar Files procedure in Supported Vendors and Configurations for JMS 1.1.

To configure FIFO messaging in a cluster for ActiveMQ:

Procedure

  1. Download ActiveMQ from http://activemq.apache.org/activemq-<ActiveMQ version>-release.html for the appropriate OS.
    Here, ActiveMQ version is the version of ActiveMQ used.
  2. Deploy an instance of ActiveMQ on each node of the cluster.
  3. An activemq.xml file is included the properties/fifo directory of the Sterling B2B Integrator deployment of each node. For each node, take this file and copy it to the ActiveMQ deployment on that node within the conf directory. This file will configure ActiveMQ to use fail over clustering utilizing the Sterling B2B Integrator database for storage and configure its port usage. By default, ActiveMQ will be configured to listen at the Sterling B2B Integrator base port + 65 and the ActiveMQ interface will be at base port + 66 (http://server:base port + 66/admin).
  4. On each Sterling B2B Integrator node, the queue configuration must be re-directed to utilize the ActiveMQ cluster. In each node, add the following to customer_overrides.properties:
    fifo.broker.username=fifo.broker.password=fifo.broker.url=
    failover:(tcp://node1_hostname:node1_base_port + 65,
    tcp://node2_hostname:node_2_base_port + 65, ..., 
    tcp://noden_hostname:node_n_base_port + 65)
  5. Start the ActiveMQ instances on each node. See http://activemq.org for additional information about running an ActiveMQ instance.
  6. Restart Sterling B2B Integrator.

    Configuring FIFO in a cluster environment:

    If you are using the FIFO Routing Adapter, the use of UDP protocol for the jgroups property lock.protocolStack with cluster environments using the same base ports in the same subnet can sometimes cause the FIFO Routing Adapter not to start correctly and stay stuck in starting status.

    To correct this issue the jgroups property, lock.protocolStack needs to be updated to TCP.

    Use the following value for the property_string property in the jgroups_cluster.properties.in file or the customer_overrides.properties file with the jgroups_cluster prefix replacing HOST_ADDR and MULTICAST_NODE_PORT3 in the string with values from sandbox.cfg:
    
    lock.protocolStack=TCP(bind_addr=HOST_ADDR;bind_port=MULTICAST_NODE_PORT3):TCPPING(initial_hosts=HOST_ADDR[MULTICAST_NODE_PORT3];port_range=0;timeout=5000;num_initial_members=2):MERGE2(min_interval=3000;
    max_interval=5000):FD_ALL(interval=5000;timeout=20000):FD(timeout=5000;max_tries=48;level=ERROR):VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(retransmit_timeout=100,200,300,600,1200,2400,4800;
    discard_delivered_msgs=true):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=20000;max_bytes=0):pbcast.GMS(print_local_addr=true;join_timeout=5000)