Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 89 Next »

Overview

This document contains description of the main features of JMS Transport Adaptor for FixEdge and common steps required to install JMS Transport Adaptor (JMS TA) for the FIX Edge.

Concept

The JMS Adaptor for FIX Server (hereinafter JMS Adaptor) is intended for communication with FIX Server from third-part applications via JMS. JMS TA is a library that exposes a set of methods for communicating with FixEdge's Transport Layer. Also, JMS TA gives a transport, which implements JMS protocol for transmitting/receiving data to/from JMS provider(s):

  • JMS TA performs packaging of FIX(ML) messages to JMS Messages (Binary or Text) with further sending to appropriate JMS provider(s);
  • JMS TA performs extracting of FIX(ML) messages from received JMS Messages with further sending it to Transport Layer;

Operation Scenarios

During FIX server start-up Transport Layer creates JMS connection for each Client Name listed in configuration ClientNames property with specified Session Type, Topic, Ack mode and other properties created.

  • After success creation of Connection to JMS Provider - notification to Transport Layer is sent via onLogon() with ClientName as parameter;
  • After success disconnect from JMS Provider - notification to Transport Layer is sent via onLogout() with ClientName as parameter;
  • After successfull registration in Transport Layer, JMS TA starts processing incoming messages from JMS Provider(s) and routing outgoing messages from TL to JMS provider(s).

Prerequisites

Path to jvm libraries should be specified in PATH variable if installation goes in Linux (E.g.: /home/user/work/environment/jdk1.7.0/jre/lib/amd64/server).

For FIXEdge prior to v5.7:

  • Java Runtime Environment 1.6 or higher
  • Path to jvm libraries should be specified in PATH variable if installation goes in Windows . (E.g.: C:\Program Files (x86)\Java\jre7\bin\server)

Installation and run steps

Configuration for ActiveMQ

Installation and run steps (after rev. 66518)

  1. Install FIXEdge for Windows (use "tar xvf" commands for Linux/Solaris)

  2. Add path to appropriate activemq*.jar to java classpath in FIXEdge1/conf/jms-ta-distribution/etc/JVM_Options.jvmopts file e.g.:

    JVM_Options.jvmopts
    Windows: -Djava.class.path=(...);FixEdge1/conf/jms-ta-distribution/tool/lib/activemq-all-5.3.2.jar;
    Linux: -Djava.class.path=(...);../FixEdge1/conf/jms-ta-distribution/tool/lib/activemq-all-5.3.2.jar;
  3. Configure paths to logs in FIXEdge1/conf/jms-ta-distribution/etc/log4j.properties. Paths to logs directory must be absolute.

  4. Configure JMS adapter in FIXEdge.properties.
    Add TransportLayer.JMSTA to TransportLayer.TransportAdapters, so as a result you should get "TransportLayer.TransportAdapters = TransportLayer.JMSTA"
    And add JMS session parameters, for example:

    FIXEdge.properties
    # Transport Layer Section
    TransportLayer.TransportAdapters = TransportLayer.JMSTA
    TransportLayer.JMSTA.Description = JMS Transport Adaptor
    TransportLayer.JMSTA.DllName = bin/jmsTADll-vc10-MD-x64.dll     // Use libJMSTA.so for Linux
    TransportLayer.JMSTA.JVMOptionsFile = FixEdge1/conf/JVM_Options.jvmopts     // Use ../FixEdge1/conf/JVM_Options.jvmopts for Linux
    TransportLayer.JMSTA.ConnectionNames = Connection1
    TransportLayer.JMSTA.ClientNames = ProducerSession, ConsumerSession
    
    TransportLayer.JMSTA.Connection.Connection1.InitialContextFactory = org.apache.activemq.jndi.ActiveMQInitialContextFactory
    TransportLayer.JMSTA.Connection.Connection1.ProviderURI = tcp://10.17.12.244:61616
    TransportLayer.JMSTA.Connection.Connection1.User = test
    TransportLayer.JMSTA.Connection.Connection1.Password = test
    TransportLayer.JMSTA.Connection.Connection1.ConnectionFactory = queueConnectionFactory
    TransportLayer.JMSTA.Connection.Connection1.Reconnect = false
    TransportLayer.JMSTA.Connection.Connection1.ReconnectTries = 3
    TransportLayer.JMSTA.Connection.Connection1.ReconnectInterval = 500
    
    TransportLayer.JMSTA.Client.ProducerSession.ConnectionName = Connection1
    TransportLayer.JMSTA.Client.ProducerSession.StorageDir = ../FixEdge1/log
    TransportLayer.JMSTA.Client.ProducerSession.SessionType = Producer
    TransportLayer.JMSTA.Client.ProducerSession.MessagingMode = Queue
    TransportLayer.JMSTA.Client.ProducerSession.DestinationURI = MyQueue 
    TransportLayer.JMSTA.Client.ProducerSession.DeliveryMode = NoPersist
    TransportLayer.JMSTA.Client.ProducerSession.TimeToLive = 100000
    TransportLayer.JMSTA.Client.ProducerSession.SessionAckMode = Auto
    TransportLayer.JMSTA.Client.ProducerSession.MessageType = Text
    TransportLayer.JMSTA.Client.ProducerSession.Transacted = true
    TransportLayer.JMSTA.Client.ProducerSession.DurableSubscription = false
    TransportLayer.JMSTA.Client.ProducerSession.DurableSubscriptionName = DurableTest
     
    TransportLayer.JMSTA.Client.ConsumerSession.ConnectionName = Connection1
    TransportLayer.JMSTA.Client.ConsumerSession.StorageDir = ../FixEdge1/log
    TransportLayer.JMSTA.Client.ConsumerSession.SessionType = Consumer
    TransportLayer.JMSTA.Client.ConsumerSession.MessagingMode = Queue
    TransportLayer.JMSTA.Client.ConsumerSession.DestinationURI = MyQueue
    TransportLayer.JMSTA.Client.ConsumerSession.DeliveryMode = NoPersist
    TransportLayer.JMSTA.Client.ConsumerSession.TimeToLive = 100000
    TransportLayer.JMSTA.Client.ConsumerSession.SessionAckMode = Auto
    TransportLayer.JMSTA.Client.ConsumerSession.MessageType = Text
    TransportLayer.JMSTA.Client.ConsumerSession.Transacted = false
    TransportLayer.JMSTA.Client.ConsumerSession.DurableSubscription = false
    TransportLayer.JMSTA.Client.ConsumerSession.DurableSubscriptionName = DurableTest
    

    Note: TransportLayer.JMSTA.Connection.Connection1.ProviderURI = tcp://10.17.12.244:61616 - host:port of Apache ActiveMQ Message Broker.

    According to this configuration, FIXEdge will establish connection (Connection1) with ActiveMQ on 10.17.12.244:61616. This connection will be used by two JMS sessions: ProducerSession will receive FIX messages and send converted messages into MyQueue queue of ActiveMQ (producer session), ConsumerSession will receive JMS messages from MyQueue queue of ActiveMQ and convert them into FIX (consumer session).

  5. Use FixEdge1/conf/BL_Config.xml as Business Layer Rules configuration file.
    According to that BL rule and to JMS adapter configuration: FIX messages from FIXCLIENT1 will be converted into JMS and sent to ActiveMQ using producer session JMSPTestSession, then consumers session JMSPTestSession2 will get these JMS messages from ActiveMQ, convert it back to FIX and send messages to FIXCLIENT2.

  6. ActiveMQ configuration (You can get it from official site).
    1. In conf/activemq.xml add <destination> to <broker> section:

      conf/activemq.xml
      <destinations>
      	<queue physicalName="MyQueue" />
      </destinations>
    2. Start ActiveMQ using bin/activemq.bat

  7. Enable UnregisteredAcceptors in  FixEdge1/conf/engine.properties (UnregisteredAcceptor.CreateSession = true)

  8. Start FIXEdge

  9. Start, for example, SimpleClient (or HSBC tool) and establish FIXCLIENT1-FIXEDGE, FIXCLIENT2-FIXEDGE sessions with FIXEdge

  10. Send FIX messages to FIXCLIENT1-FIXEDGE session

  11. Messages from FIXCLIENT1-FIXEDGE session should be received in FIXCLIENT2-FIXEDGE Session

  12. Open ActiveMQ admin console. Messages Enqueued and Messages Dequeued counters on Queues and Topics page should be changing with each sent message.

Installation and run steps (prior rev. 66518)

...
3. Unpack jms-ta-distribution*.zip to FixEdge1/conf/
4-5. In FixEdge1/conf directory create JVM_Options.jvmopts file with:

JVM_Options.jvmopts
-Xms232m
-Xmx512m
-Xrs
-Djava.class.path=FixEdge1/conf/jms-ta-distribution/lib/jms-ta-jni-1.2.2.jar;FixEdge1/conf/jms-ta-distribution/lib/jms-ta-core-1.2.2.jar;FixEdge1/conf/jms-distribution-1.2.2/lib/activemq-all-A.B.C.jar;FixEdge1/conf/;

Where 1.2.2 - numbers in version of jms-distribution.
A.B.C -  numbers in version of activemq jar-file.

6. Copy log4j.properties file (on older version it is logback.xml) from FixEdge1/conf/jms-distribution/etc to FixEdge1/conf
7. ...
8. Configure BL_Config.xml as:

BL_Config.xml
<?xml version="1.0" encoding="UTF-8" ?>
<FIXEdge>
<BusinessLayer>
     <Rule>
          <Source>
               <FixSession SenderCompID="FIXCLIENT1" TargetCompID="FIXEDGE"/>
          </Source>
               <Action>
                    <Send Name="ProducerSession" />
               </Action>
     </Rule>
     <Rule>
          <Source Name="ConsumerSession" />
               <Action>
                    <Send>
                         <FixSession SenderCompID="FIXEDGE" TargetCompID="FIXCLIENT2"/>
                    </Send>
              </Action>
     </Rule>
     <DefaultRule>
          <Action>
               <DoNothing/>
          </Action>
     </DefaultRule>
</BusinessLayer>
</FIXEdge>

Configuration for TIBCO EMS

On TIBCO EMS side

  1. In C:\ProgramData\TIBCO_HOME\tibco\cfgmgmt\ems\data\tibemsd.conf file set

                 authorization = enabled

                 user_auth = local  // Not sure if this is required 

                 client_heartbeat_server =  <interval>  // in seconds

     2. Using TIBCO EMS admin tool og GEMS create user "fixedge_dev" with password "fixedge_dev"

     3.  Using TIBCO EMS admin tool og GEMS create TOPIC "fixedge.deals"

     4. In "fixedge.deals" topic set isSecure property to "true"

     5. Assign "Subscribe To Topic", "Create Durable" and "Use Durable" permissions for "fixedge_dev" user

     6. There is no need in manual creation of DURABLE. FIXEdge will create it automatically.

On FIXEdge side

  1. Install FIXEdge for Windows (use "tar xvf" commands for Linux/Solaris)

  2. Put jmsTADll-xx.dll (libjmsTADll-xx.so and symlink libjmsTA.so  for Linux/Solaris) file from JMSAdaptor package into bin directory of FIXEdge

  3. Copy "jms-ta-distribution" directory to FIXEdge's configuration directory (e.g FixEdge1/conf/)

  4. Copy JVM_Options.jvmopts from Package/DOC/ to FixEdge1/conf/ 

  5. Copy appropriate tibjms.jar library from TIBCO EMS (for example, it can be located into C:/tibco/ems/6.3/lib/) to, for example, jms-ta-distribution/tool/lib/ folder and add path to this library to classpath in JVM_Options.jvmopts, e.g.:

    JVM_Options.jvmopts
    -Djava.class.path=(...);FixEdge1/conf/jms-ta-distribution/tool/lib/tibjms.jar;
  6. Configure consumer connection parameters in the FIXEdge.properties, e.g.:

    FIXEdge.properties
    TransportLayer.TransportAdapters = TransportLayer.JMSTA
    
    TransportLayer.JMSTA.Description = JMS Transport Adaptor
    TransportLayer.JMSTA.DllName = bin/jmsTADll-vc10-MD-x64.dll 
    TransportLayer.JMSTA.JVMOptionsFile = FixEdge1/conf/JVM_Options.jvmopts 
    TransportLayer.JMSTA.ConnectionNames = Connection1
    TransportLayer.JMSTA.ClientNames = fixedge_recv_dev   // This will be used as ClientID of durable
    
    TransportLayer.JMSTA.Connection.Connection1.InitialContextFactory = com.tibco.tibjms.naming.TibjmsInitialContextFactory
    TransportLayer.JMSTA.Connection.Connection1.ProviderURI = tcp://epuakyiw1476:7222
    TransportLayer.JMSTA.Connection.Connection1.User = fixedge_dev
    TransportLayer.JMSTA.Connection.Connection1.Password = fixedge_dev
    TransportLayer.JMSTA.Connection.Connection1.ConnectionFactory = TopicConnectionFactory
    TransportLayer.JMSTA.Connection.Connection1.ReconnectTries = 2000000
    TransportLayer.JMSTA.Connection.Connection1.ReconnectInterval = 2000
    TransportLayer.JMSTA.Connection.Connection1.Reconnect = true
    
    ## Topic Consumer client
    TransportLayer.JMSTA.Client.fixedge_recv_dev.ConnectionName = Connection1
    TransportLayer.JMSTA.Client.fixedge_recv_dev.SessionType = Consumer
    TransportLayer.JMSTA.Client.fixedge_recv_dev.MessagingMode = Topic
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DestinationURI = fixedge.deals
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DeliveryMode = NoPersist
    TransportLayer.JMSTA.Client.fixedge_recv_dev.TimeToLive = 100000
    TransportLayer.JMSTA.Client.fixedge_recv_dev.SessionAckMode = Auto
    TransportLayer.JMSTA.Client.fixedge_recv_dev.MessageType = Text
    TransportLayer.JMSTA.Client.fixedge_recv_dev.StorageDir = FixEdge1/log
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DurableSubscription = true
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DurableSubscriptionName = fixedge.deals


    If you need to configure consumer and producer, then you should repeat steps 2 and 5 from "On TIBCO EMS side" instruction and in FIXEdge.properties configuration should looks like:

    FIXEdge.properties
    TransportLayer.TransportAdapters = TransportLayer.JMSTA
    
    TransportLayer.JMSTA.Description = JMS Transport Adaptor
    TransportLayer.JMSTA.DllName = bin/jmsTADll-vc10-MD-x64.dll
    TransportLayer.JMSTA.JVMOptionsFile = FixEdge1/conf/JVM_Options.jvmopts
    TransportLayer.JMSTA.ConnectionNames = Connection1,Connection2
    TransportLayer.JMSTA.ClientNames = fixedge_recv_dev,fixedge_send_dev
    
    TransportLayer.JMSTA.Connection.Connection1.InitialContextFactory = com.tibco.tibjms.naming.TibjmsInitialContextFactory
    TransportLayer.JMSTA.Connection.Connection1.ProviderURI = tcp://epuakyiw1476:7222
    TransportLayer.JMSTA.Connection.Connection1.User = fixedge_dev
    TransportLayer.JMSTA.Connection.Connection1.Password = fixedge_dev
    TransportLayer.JMSTA.Connection.Connection1.ConnectionFactory = TopicConnectionFactory
    TransportLayer.JMSTA.Connection.Connection1.ReconnectTries = 2000000
    TransportLayer.JMSTA.Connection.Connection1.ReconnectInterval = 2000
    TransportLayer.JMSTA.Connection.Connection1.Reconnect = true
    
    TransportLayer.JMSTA.Connection.Connection2.InitialContextFactory = com.tibco.tibjms.naming.TibjmsInitialContextFactory
    TransportLayer.JMSTA.Connection.Connection2.ProviderURI = tcp://epuakyiw1476:7222
    TransportLayer.JMSTA.Connection.Connection2.User = fixedge
    TransportLayer.JMSTA.Connection.Connection2.Password = fixedge
    TransportLayer.JMSTA.Connection.Connection2.ConnectionFactory = TopicConnectionFactory
    TransportLayer.JMSTA.Connection.Connection2.ReconnectTries = 2000000
    TransportLayer.JMSTA.Connection.Connection2.ReconnectInterval = 2000
    TransportLayer.JMSTA.Connection.Connection2.Reconnect = true
       
    ## Topic Consumer client
    TransportLayer.JMSTA.Client.fixedge_recv_dev.ConnectionName = Connection1
    TransportLayer.JMSTA.Client.fixedge_recv_dev.SessionType = Consumer
    TransportLayer.JMSTA.Client.fixedge_recv_dev.MessagingMode = Topic
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DestinationURI = fixedge.deals
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DeliveryMode = NoPersist
    TransportLayer.JMSTA.Client.fixedge_recv_dev.TimeToLive = 100000
    TransportLayer.JMSTA.Client.fixedge_recv_dev.SessionAckMode = Auto
    TransportLayer.JMSTA.Client.fixedge_recv_dev.MessageType = Text
    TransportLayer.JMSTA.Client.fixedge_recv_dev.StorageDir = FixEdge1/log
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DurableSubscription = true
    TransportLayer.JMSTA.Client.fixedge_recv_dev.DurableSubscriptionName = fixedge.deals
    
     ## Topic Producer client
    TransportLayer.JMSTA.Client.fixedge_send_dev.ConnectionName = Connection2
    TransportLayer.JMSTA.Client.fixedge_send_dev.SessionType = Producer
    TransportLayer.JMSTA.Client.fixedge_send_dev.MessagingMode = Topic
    TransportLayer.JMSTA.Client.fixedge_send_dev.DestinationURI = fixedge.deals
    TransportLayer.JMSTA.Client.fixedge_send_dev.DeliveryMode = NoPersist
    TransportLayer.JMSTA.Client.fixedge_send_dev.TimeToLive = 100000
    TransportLayer.JMSTA.Client.fixedge_send_dev.SessionAckMode = Auto
    TransportLayer.JMSTA.Client.fixedge_send_dev.MessageType = Text
    TransportLayer.JMSTA.Client.fixedge_send_dev.StorageDir = FixEdge1/log
    TransportLayer.JMSTA.Client.fixedge_send_dev.DurableSubscription = false
    TransportLayer.JMSTA.Client.fixedge_send_dev.DurableSubscriptionName = fixedge.deals

    7. Configure BL Rules in BL_Config.xml to put received FIX messages to "fixedge_send_dev" client and get messages from "fixedge_recv_dev" client

    8. Start TIBCO EMS

    9. Start FIXEdge

Configuration

The JMS adaptor is configured by means of the following properties:

Property name
Description
RequiredDefault Value
TransportLayer.TransportAdapters

Comma delimited list of TA.

Separate configuration section for each listed client should be specified. JMSTA should be specified here.

Y
TransportLayer.JMSTA.DescriptionTA DescriptionYJMS Transport Adaptor
TransportLayer.JMSTA.DllNameTA library file name. In case this parameter is not specified, the TransportLayer.JMSTA.AdapterId is applied to define the adapter's library by IDY
TransportLayer.JMSTA.AdapterId

The parameter to define the adapter's library by ID. In case this parameter is not specified, or TransportLayer.JMSTA.DllName parameter is specified too, the TransportLayer.JMSTA.DllName is applied

This parameter is applicable since FIXEdge C++ version 6.14.0

Required value: JMS

N
TransportLayer.JMSTA.JVMOptionsFileTA configuration file nameY
TransportLayer.JMSTA.AllowRejectMessagesWhen option is true, JMS rejects messages if unable to send to the MQ or error was fired. False by default.Nfalse
TransportLayer.JMSTA.AllowRepeatedStatusNotificationWhen option is true, JMS allows to call onLogout() callback if no onLogon() callback was called. False by default.Nfalse
TransportLayer.JMSTA.ConnectionNamesComma delimited list of TA connections.
Separate configuration section for each listed connection should be specified
Y
TransportLayer.JMSTA.ClientNamesComma delimited list of TA clients.
Separate configuration section for each listed client should be specified
Y
TransportLayer.JMSTA.FIXVersionIn every session, FIX messages use a particular version of the FIX protocol. Use this parameter to set the version of the FIX protocol for a given session.
 
Acceptable values:
FIX40, FIX41, FIX42, FIX43, FIX44, FIX50, FIX50SP1, FIX50SP2.
NFIX44
Connections parameters
TransportLayer.JMSTA.Connection.[ConnectionName].InitialContextFactory

JNDI option. The fully qualified class name of the factory class that will create the initial context. An initial context is the starting point for naming operations.

C, required if JNDI mechanism is used
TransportLayer.JMSTA.Connection.[ConnectionName].ProviderURIJMS provider URI that defines where the Connection that is created is to connect to as well as the protocol that should be used, for example TCP/IP. Additionally configuration information can be encoded in the URI.Y
TransportLayer.JMSTA.Connection.[ConnectionName].UserUser nameY
TransportLayer.JMSTA.Connection.[ConnectionName].PasswordUser PasswordY
TransportLayer.JMSTA.Connection.[ConnectionName].ConnectionFactoryJNDI option. Connection factory object name in the JNDI object store.C, required if JNDI mechanism is used
TransportLayer.JMSTA.Connection.[ConnectionName].ReconnectEnables or disables reconnect procedure for connection restoreNfalse
TransportLayer.JMSTA.Connection.[ConnectionName].ReconnectTriesNumber of reconnect tries or -1 for an infinite number of attemptsN3
TransportLayer.JMSTA.Connection.[ConnectionName].ReconnectIntervalFixed interval in milliseconds between reconnection attemptsN2000
Clients parameters
TransportLayer.JMSTA.Client.[ClientName].ConnectionNameName of primary connection used by client. Connection should be registered in ConnectionNames enumeration and has all required parametersY
TransportLayer.JMSTA.Client.[ClientName].StorageDirDirectory where persistence file is stored in case the communication problemY, if persistent mode is enabled
TransportLayer.JMSTA.Client.[ClientName].SessionType

Session type:

  • Producer - session is a message producer
  • Consumer - session is a message consumer
Y
TransportLayer.JMSTA.Client.[ClientName].MessagingMode

Session messaging mode:

Queue - Point-To-Point. Each message is addressed to a specific queue, and receiving clients extract messages from the queue(s) established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire.

Topic - Publish/Subscribe. In a pub/sub product or application, clients address messages to a topic. Publishers and subscribers are generally anonymous and may dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a topic’s multiple publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them to current subscribers.
Y
TransportLayer.JMSTA.Client.[ClientName].DestinationURIURI of session destination (Queue name)Y
TransportLayer.JMSTA.Client.[ClientName].DeliveryMode

Specifies whether sent messages are lost if the JMS provider fails.

Persist - instructs the JMS provider to take extra care to ensure that a message is not lost in transit in case of a JMS provider failure. A message sent with this delivery mode is logged to stable storage when it is sent.

NoPersist - does not require the JMS provider to store the message or otherwise guarantee that it is not lost if the provider fails.

NOTE: used only for Producer sessions.

NPersist
TransportLayer.JMSTA.Client.[ClientName].TimeToLiveThis value defines a message expiration time (in milliseconds) that is the sum of the message's time-to-live and the GMT when it is sent (for transacted sends, this is the time the client sends the message, not the time the transaction is committed). Setting parameter value to "0" will lead to infinite TTL.Y3000
TransportLayer.JMSTA.Client.[ClientName].SessionAckMode

Defines mode in which the Session will acknowledge the messages that it receives and dispatches.

Auto - With this acknowledgement mode, the session automatically acknowledges a client's receipt of a message either when the session has successfully returned from a call to receive or when the message listener the session has called to process the message successfully returns.

Client - With this acknowledgement mode, the client acknowledges a consumed message by calling the message's acknowledge method. Acknowledging a consumed message acknowledges all messages that the session has consumed. When client acknowledgement mode is used, a client may build up a large number of unacknowledged messages while attempting to process them.

DupsOk - This acknowledgement mode instructs the session to lazily acknowledge the delivery of messages. This is likely to result in the delivery of some duplicate messages if the JMS provider fails, so it should only be used by consumers that can tolerate duplicate messages. Use of this mode can reduce session overhead by minimizing the work the session does to prevent duplicates.

NAuto
TransportLayer.JMSTA.Client.[ClientName].MessageType

JMS Message type used for this session.

Bytes - A stream of interpreted bytes. This message type is for literally encoding a body to match an existing message format.

Text - Data is stored as a string. This message type is useful for exchanging simple text messages and for more complex character data, such as XML documents.

Custom - The ability to use your own message type. This message type is useful for adaptation to already existing systems. For this message type property TransportLayer.JMSTA.Client.[ClientName].CustomMessageType is required.

Y
TransportLayer.JMSTA.Client.[ClientName].CustomMessageType

Class of custom message type implementation. This should be the implementation of one of the interface:
com.epam.fixengine.jms.client.consumer.IFromMessageConverter
com.epam.fixengine.jms.client.consumer.IToMessageConverter

NOTE: used only for Custom message type.

Y, if MessageType is Custom
TransportLayer.JMSTA.Client.[ClientName].Transacted

Sending/consuming of messages in the session is transacted.

true - transacted.

false - not transacted. The value is used by default.

Nfalse
TransportLayer.JMSTA.Client.[ClientName].TransactionBatchSize

Max number of message for one transaction. Take from queue the available number of message but no more than that specified in this property.

NOTE: used only if transacted is enabled.

N20
TransportLayer.JMSTA.Client.[ClientName].QueueSizeMax number of messages in queue. Message is queued until successfully sent. Waiting for space to become available if the queue is full.N100
TransportLayer.JMSTA.Client.[ClientName].QueuePersistent

Store messages in file until it committed. It allows to restore and send messages after a sudden cardiac application.

true – persistent queue.

false – in memory queue. Faster but less safe, some messages may be lost after restart.
Nfalse
TransportLayer.JMSTA.Client.[ClientName].QueueNormalFileSize

After reaching this size, adapter waits when the queue will be empty for to truncate file. File size in Mbytes.

NOTE: used only for persistent queue.

N10
TransportLayer.JMSTA.Client.[ClientName].QueueMaxFileSize

After reaching this size, adapter truncate the file and overwrites the messages that are queued. File size in Mbytes.

NOTE: used only for persistent queue.

N50
TransportLayer.JMSTA.Client.[ClientName].DurableSubscription

Durable topic subscriptions allows receiving messages published while the subscriber is not active. Durable subscriptions offer the reliability of queues to the publish/subscribe message domain.

true - Subscription is durable.

false - Subscription is not durable.

NOTE:

  • used only for Consumer sessions.
  • checks that Producer sends messages with Persistent delivery mode.
Nfalse
TransportLayer.JMSTA.Client.[ClientName].DurableSubscriptionNameDurable subscription name.Y, required if DurableSubscription set to true.
TransportLayer.JMSTA.Client.[ClientName].ConnectionsCount

Number of JMS connections.

Adaptor will open given amount of connections to JMS server for given session to send simultaneously.

NOTE: Please pay attention that if a number of connection is greater then 1 that there is no guaranty that messages will be placed to JMS in the same order they were received by adapter.

N1
TransportLayer.JMSTA.Client.[ClientName].ThreadsPerConnection

Number of threads per one JMS connection. Adaptor will open given amount of JMS sessions for each JMS connection to send simultaneously.

NOTE: Please pay attention that if a number of thread per connection is greater then 1 that there is no guaranty that messages will be placed to JMS in the same order they were received by adapter.

N1

Note that all changes in the properties file are applied only after FixEdge restart.

JMS Adapter Monitoring

Available since FIXEdge 6.13.0 release.

The Kafka Transport Adapter is integrated with a FIXICC monitoring feature.

Information about the configured TA's session parameters list and dynamic state is sent to the subscribed monitoring application when FIXEdge starts.

When the TA session dynamic state is changed FIXEdge sends the update to the subscribed monitoring application.

The adapter provides information about the following indicators:

Name shown

Description

Status

Status of the JMS TA session

Time of the last successful message sendingTime of the last successful message sending in UTC time zone
Time of the last successful message receivingTime of the last successful message receiving in UTC time zone

Start and Stop operations for JMS TA

Available since FIXEdge 6.13.0 release.

FIXEdge C++ provides Start operation for Disconnected JMS TA sessions and Stop operation for Connecting and Running JMS TA sessions on request from the subscribed monitoring application.

Please refer to the Transport adaptor operations for FIXEdge C++ page for additional details about Start and Stop operations.

Start operation

Start operation can be applied to JMS TA sessions in the Disconnected state.

FIXEdge starts a particular JMS TA session on the request from the subscribed monitoring application and if the operation has been applied replies with a successful response.

In case when there is no session with the requested name FIXEdge logs an error and replies to the subscribed monitoring application with an error response below: 

Can't find session with id <session_name>

In case when Start operation cannot be applied FIXEdge replies to the subscribed monitoring application with an error response and logs an error below:

"Session '<session_name>': The session <session_name> can't be started: <description> Reason: Operation cannot be applied"

Stop operation

Stop operation can be applied to JMS TA sessions in the Running and Connecting states.

FIXEdge stops a particular JMS TA session on the request from the subscribed monitoring application and if the operation has been applied replies with a successful response.

In case when there is no session with the requested name FIXEdge logs an error and replies to the subscribed monitoring application with an error response below:

Can't find session with id <session_name>

In case when Stop operation cannot be applied FIXEdge replies to the subscribed monitoring application with an error response and logs an error below:

"Session '<session_name>': The session <session_name> can't be stopped: <description> Reason: Operation cannot be applied"

In case when JMS TA session is in a Disconnected state and JMS TA receives the message, this message is persisted in storage to be sent on JMS TA session start.

Troubleshooting

Linux and Windows default configuration have different relative paths

Solution:

  • On linux all relative paths should be set from FIXEdge bin/ directory (e.g /home/user/B2BITS/FixEdge/v.5.8.0.x/bin) because packages for various OS has different values of FIXEdge.RootDir parameter in FIXEdge.properties.

JMS Transport Adapter fails with "Exception description.java.lang.IllegalArgumentException: Problem with initiation of InitialContext. Cannot instantiate class"

Issues in the logs


2021-02-09 12:38:27,496 UTC   DEBUG   [JNI_WRAPPER]  140737353992000  Exception description.java.lang.IllegalArgumentException: Problem with initiation of InitialContext. Cannot instantiate class: com.tibco.tibjms.naming.TibjmsInitialContextFactory
        at com.epam.fixengine.jms.context.JndiContext.configureJNDIContext(JndiContext.java:59)
        at com.epam.fixengine.jms.context.SessionContext.<init>(SessionContext.java:30)
        at com.epam.fe.jms.JMSAdaptorImpl.createSessions(JMSAdaptorImpl.java:65)
        at com.epam.fe.jms.JMSAdaptorImpl.init(JMSAdaptorImpl.java:46)
        at com.epam.fe.jms.jni.JMSAdaptor.init(JMSAdaptor.java:29)
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: com.tibco.tibjms.naming.TibjmsInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.tibco.tibjms.naming.TibjmsInitialContextFactory]
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
        at javax.naming.InitialContext.init(InitialContext.java:244)
        at javax.naming.InitialContext.<init>(InitialContext.java:216)
        at com.epam.fixengine.jms.context.JndiContext.<init>(JndiContext.java:32)
        at com.epam.fixengine.jms.context.JndiContext.configureJNDIContext(JndiContext.java:57)
        ... 4 more


Root cause

JMS transport adapter libraries (e.g JMS ta, Tibco, active MQ, etc..) are not found in the configured classpath: java.class.path.

EPAM doesn't provide TIBCO EMS libraries. They should be downloaded from the official TIBCO resources.

Solution

  • Make sure that libraries are placed to jms-ta-distribution/tool/lib/.
  • Check if the required libraries are defined in JVM properties files (JVM_Options.jvmopts) classpath

    JVM_Options.jvmopts

    -Djava.class.path=/opt/fixedge/FIXEdge/FIXEdge1/conf;/opt/fixedge/FIXEdge/FIXEdge1/conf/jms-ta-distribution/lib/jms-ta-jni-1.2.10.jar;/opt/fixedge/FIXEdge/FIXEdge1/conf/jms-ta-distribution/lib/jms-ta-core-1.2.10.jar;/opt/fixedge/FIXEdge/FIXEdge1/conf/jms-ta-distribution/etc;/opt/fixedge/FIXEdge/FIXEdge1/conf/jms-ta-distribution/tool/lib/tibjms.jar

  • The recent version of TIBCO EMS libraries uses jms version 2.0 or newer. For this case jms-2.0.jar should be also copied to  to FIXEdge1\conf\jms-ta-distribution\lib and added to the classpath:

    JVM_Options.jvmopts

    -Djava.class.path=...;/opt/fixedge/FIXEdge/FIXEdge1/conf/jms-ta-distribution/tool/lib/jms-2.0.jar


  • No labels