Friday, August 11, 2017

Handling FIX session level reject messages in WSO2 ESB

FIX transport implementation  in WSO2 ESB, and  different usages of FIX with integration is discussed in detail in [1]. As much as processing FIX messages it is also important that the integration layer handles any serious FIX errors as well.

FIX  Reject <3> messages are issued when a message is received but cannot be properly processed due to a session-level rule violation. Different reasons for causing session-level rule violations are discussed in [2]. With WSO2 ESB 5.0 we have enhanced FIX implementation for you to acknowledge these session level reject messages and process error handling accordingly. 

You can implement SessionEventHandler (org.apache.synapse.transport.fix.SessionEventHandler)  and direct back specific FIX messages (REJECT<3> messages in this case) back to your proxy. In this case we are updating fromAdmin method to send session level reject messages back to the application, which is the proxy.

public class InitiatorSessionEventHandler implements SessionEventHandler {

public void fromAdmin(FIXIncomingMessageHandler fixIncomingMessageHandler, Message message, SessionID sessionID) {
        //Sending fix 35=3 admin message back to the client.
       try {

           if (message.getHeader().getField(new StringField(35)).getValue().equals("3")) {

               fixIncomingMessageHandler.fromApp(message, sessionID);


Now you just need to add above handler jar to ESB/repository/components/lib and  access these reject messages from your proxy, and do proper error handling.

<filter regex="3" source="//message/header/field[@id='35']">
//error handling 

<parameter name="transport.fix.InitiatorSessionEventHandler">com.wso2.test.InitiatorSessionEventHandler</parameter>

This is just a simple sample on how you can extend SessionEventHandler! You could extend this for any of your session level FIX requirements. And guess what? This is 100% open source! Check out [3] on how WSO2  ESB is 100% open source and how you can benefit from it.


Thursday, August 3, 2017

Powerful capabilities of WSO2 ESB

WSO2 ESB is the one stop shop for your integration requirements.

You need to send a message request of format1 to a back-end that accepts messages of format2? Worried about data format transformations? WSO2 ESB will cover this  for you with  its data transformation capabilities.

You need to send different requests of users to different back-ends? Worried about  how to route these messages? WSO2 ESB will cover this for you ,with its message routing capabilities.

Need to make sure that your service is not available to public and its secured? WSO2 ESB has this covered with its service mediation capabilities.

This is just a glimpse of what WSO2 ESB has in store.. How about data transportation and service hosting? Yes these too are WSO2 ESB capabilities..

Check out written by  Samisa Abeysinghe  (Chief Engineering and Delivery Officer at WSO2) and find out more!