WSO2 Integrator: How to setup FIX Initiator failover?












0















How can I configure a WSO2 Integrator FIX initiator endpoint which utilizes automatic session failover supported by Quickfix/J?



In Quickfix/J, it is possible to configure automatic failover of the initiator session using the FIX config file as follows (assuming two localhost FIX servers listening on ports 9997,9998)



[SESSION]
SenderCompID=SYNAPSE
TargetCompID=EXEC
SocketConnectHost=localhost
SocketConnectPort=9997
SocketConnectHost1=localhost
SocketConnectPort1=9998
ReconnectInterval=5


All examples in WSO2 documentation show FIX endpoints configured with a hardcoded host such as:



<send>
<endpoint>
<address uri="fix://localhost:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
</endpoint>
</send>


This pattern is not possible for us because the target FIX server is on a remote server with a hostname that is different per environment, so I never want to hardcore the target host like this.



Ideally I would like to do something like this:



<send>
<address uri="fix://<dynamic hostname>:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
// the endpoint representing the above FIX Session
// where the target host is dynamically defined
// and not hardcoded anywhere in my car application
</send>


On the receiver/listener side as a Proxy Service this works fine, because in the proxy service it lifts the configuration from the supplied initiator config URL parameter, so the failover happens "under the hood" by the FIX engine.



<parameter name="transport.fix.InitiatorConfigURL">quickfix.cfg</parameter>


However it doesn't look like it's possible to do the same when you are sending a message to the target FIX server.



Does anyone have a good suggestion or an example for how to achieve this?










share|improve this question



























    0















    How can I configure a WSO2 Integrator FIX initiator endpoint which utilizes automatic session failover supported by Quickfix/J?



    In Quickfix/J, it is possible to configure automatic failover of the initiator session using the FIX config file as follows (assuming two localhost FIX servers listening on ports 9997,9998)



    [SESSION]
    SenderCompID=SYNAPSE
    TargetCompID=EXEC
    SocketConnectHost=localhost
    SocketConnectPort=9997
    SocketConnectHost1=localhost
    SocketConnectPort1=9998
    ReconnectInterval=5


    All examples in WSO2 documentation show FIX endpoints configured with a hardcoded host such as:



    <send>
    <endpoint>
    <address uri="fix://localhost:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
    </endpoint>
    </send>


    This pattern is not possible for us because the target FIX server is on a remote server with a hostname that is different per environment, so I never want to hardcore the target host like this.



    Ideally I would like to do something like this:



    <send>
    <address uri="fix://<dynamic hostname>:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
    // the endpoint representing the above FIX Session
    // where the target host is dynamically defined
    // and not hardcoded anywhere in my car application
    </send>


    On the receiver/listener side as a Proxy Service this works fine, because in the proxy service it lifts the configuration from the supplied initiator config URL parameter, so the failover happens "under the hood" by the FIX engine.



    <parameter name="transport.fix.InitiatorConfigURL">quickfix.cfg</parameter>


    However it doesn't look like it's possible to do the same when you are sending a message to the target FIX server.



    Does anyone have a good suggestion or an example for how to achieve this?










    share|improve this question

























      0












      0








      0








      How can I configure a WSO2 Integrator FIX initiator endpoint which utilizes automatic session failover supported by Quickfix/J?



      In Quickfix/J, it is possible to configure automatic failover of the initiator session using the FIX config file as follows (assuming two localhost FIX servers listening on ports 9997,9998)



      [SESSION]
      SenderCompID=SYNAPSE
      TargetCompID=EXEC
      SocketConnectHost=localhost
      SocketConnectPort=9997
      SocketConnectHost1=localhost
      SocketConnectPort1=9998
      ReconnectInterval=5


      All examples in WSO2 documentation show FIX endpoints configured with a hardcoded host such as:



      <send>
      <endpoint>
      <address uri="fix://localhost:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
      </endpoint>
      </send>


      This pattern is not possible for us because the target FIX server is on a remote server with a hostname that is different per environment, so I never want to hardcore the target host like this.



      Ideally I would like to do something like this:



      <send>
      <address uri="fix://<dynamic hostname>:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
      // the endpoint representing the above FIX Session
      // where the target host is dynamically defined
      // and not hardcoded anywhere in my car application
      </send>


      On the receiver/listener side as a Proxy Service this works fine, because in the proxy service it lifts the configuration from the supplied initiator config URL parameter, so the failover happens "under the hood" by the FIX engine.



      <parameter name="transport.fix.InitiatorConfigURL">quickfix.cfg</parameter>


      However it doesn't look like it's possible to do the same when you are sending a message to the target FIX server.



      Does anyone have a good suggestion or an example for how to achieve this?










      share|improve this question














      How can I configure a WSO2 Integrator FIX initiator endpoint which utilizes automatic session failover supported by Quickfix/J?



      In Quickfix/J, it is possible to configure automatic failover of the initiator session using the FIX config file as follows (assuming two localhost FIX servers listening on ports 9997,9998)



      [SESSION]
      SenderCompID=SYNAPSE
      TargetCompID=EXEC
      SocketConnectHost=localhost
      SocketConnectPort=9997
      SocketConnectHost1=localhost
      SocketConnectPort1=9998
      ReconnectInterval=5


      All examples in WSO2 documentation show FIX endpoints configured with a hardcoded host such as:



      <send>
      <endpoint>
      <address uri="fix://localhost:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
      </endpoint>
      </send>


      This pattern is not possible for us because the target FIX server is on a remote server with a hostname that is different per environment, so I never want to hardcore the target host like this.



      Ideally I would like to do something like this:



      <send>
      <address uri="fix://<dynamic hostname>:9997?BeginString=FIX.4.4&SenderCompID=SYNAPSE&TargetCompID=EXEC"/>
      // the endpoint representing the above FIX Session
      // where the target host is dynamically defined
      // and not hardcoded anywhere in my car application
      </send>


      On the receiver/listener side as a Proxy Service this works fine, because in the proxy service it lifts the configuration from the supplied initiator config URL parameter, so the failover happens "under the hood" by the FIX engine.



      <parameter name="transport.fix.InitiatorConfigURL">quickfix.cfg</parameter>


      However it doesn't look like it's possible to do the same when you are sending a message to the target FIX server.



      Does anyone have a good suggestion or an example for how to achieve this?







      wso2 wso2esb fix wso2ei






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 '18 at 18:19









      Petteri PertolaPetteri Pertola

      1582417




      1582417
























          1 Answer
          1






          active

          oldest

          votes


















          0














          As you are using a normal 'address endpoint' you should also be able to use the normal failover configurations: see https://docs.wso2.com/display/ESB500/Configuring+Failover+Endpoints for info.






          share|improve this answer
























          • Hi Jan, that would still require me to hardcode the hostname. This is different per environment, so I want to inject it from environment variables or similar. Also, I would like to use the QuickfixJ native session failover and not the physical failover as done by ESB.

            – Petteri Pertola
            Nov 28 '18 at 16:24











          • I am not too familiar with FIX but the config is also configured locally right? So essentially you configure the endpoint still per environment. There are several solutions each with their own drawback: you can define a registry file 'dynamic_hostname' with the hostname there and then define the endpoint dynamically or use a 'Endpoint' artifact in the registry and refer to that endpoint using 'key=..'

            – Jan
            Nov 30 '18 at 15:31











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380521%2fwso2-integrator-how-to-setup-fix-initiator-failover%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          As you are using a normal 'address endpoint' you should also be able to use the normal failover configurations: see https://docs.wso2.com/display/ESB500/Configuring+Failover+Endpoints for info.






          share|improve this answer
























          • Hi Jan, that would still require me to hardcode the hostname. This is different per environment, so I want to inject it from environment variables or similar. Also, I would like to use the QuickfixJ native session failover and not the physical failover as done by ESB.

            – Petteri Pertola
            Nov 28 '18 at 16:24











          • I am not too familiar with FIX but the config is also configured locally right? So essentially you configure the endpoint still per environment. There are several solutions each with their own drawback: you can define a registry file 'dynamic_hostname' with the hostname there and then define the endpoint dynamically or use a 'Endpoint' artifact in the registry and refer to that endpoint using 'key=..'

            – Jan
            Nov 30 '18 at 15:31
















          0














          As you are using a normal 'address endpoint' you should also be able to use the normal failover configurations: see https://docs.wso2.com/display/ESB500/Configuring+Failover+Endpoints for info.






          share|improve this answer
























          • Hi Jan, that would still require me to hardcode the hostname. This is different per environment, so I want to inject it from environment variables or similar. Also, I would like to use the QuickfixJ native session failover and not the physical failover as done by ESB.

            – Petteri Pertola
            Nov 28 '18 at 16:24











          • I am not too familiar with FIX but the config is also configured locally right? So essentially you configure the endpoint still per environment. There are several solutions each with their own drawback: you can define a registry file 'dynamic_hostname' with the hostname there and then define the endpoint dynamically or use a 'Endpoint' artifact in the registry and refer to that endpoint using 'key=..'

            – Jan
            Nov 30 '18 at 15:31














          0












          0








          0







          As you are using a normal 'address endpoint' you should also be able to use the normal failover configurations: see https://docs.wso2.com/display/ESB500/Configuring+Failover+Endpoints for info.






          share|improve this answer













          As you are using a normal 'address endpoint' you should also be able to use the normal failover configurations: see https://docs.wso2.com/display/ESB500/Configuring+Failover+Endpoints for info.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 28 '18 at 12:28









          JanJan

          43637




          43637













          • Hi Jan, that would still require me to hardcode the hostname. This is different per environment, so I want to inject it from environment variables or similar. Also, I would like to use the QuickfixJ native session failover and not the physical failover as done by ESB.

            – Petteri Pertola
            Nov 28 '18 at 16:24











          • I am not too familiar with FIX but the config is also configured locally right? So essentially you configure the endpoint still per environment. There are several solutions each with their own drawback: you can define a registry file 'dynamic_hostname' with the hostname there and then define the endpoint dynamically or use a 'Endpoint' artifact in the registry and refer to that endpoint using 'key=..'

            – Jan
            Nov 30 '18 at 15:31



















          • Hi Jan, that would still require me to hardcode the hostname. This is different per environment, so I want to inject it from environment variables or similar. Also, I would like to use the QuickfixJ native session failover and not the physical failover as done by ESB.

            – Petteri Pertola
            Nov 28 '18 at 16:24











          • I am not too familiar with FIX but the config is also configured locally right? So essentially you configure the endpoint still per environment. There are several solutions each with their own drawback: you can define a registry file 'dynamic_hostname' with the hostname there and then define the endpoint dynamically or use a 'Endpoint' artifact in the registry and refer to that endpoint using 'key=..'

            – Jan
            Nov 30 '18 at 15:31

















          Hi Jan, that would still require me to hardcode the hostname. This is different per environment, so I want to inject it from environment variables or similar. Also, I would like to use the QuickfixJ native session failover and not the physical failover as done by ESB.

          – Petteri Pertola
          Nov 28 '18 at 16:24





          Hi Jan, that would still require me to hardcode the hostname. This is different per environment, so I want to inject it from environment variables or similar. Also, I would like to use the QuickfixJ native session failover and not the physical failover as done by ESB.

          – Petteri Pertola
          Nov 28 '18 at 16:24













          I am not too familiar with FIX but the config is also configured locally right? So essentially you configure the endpoint still per environment. There are several solutions each with their own drawback: you can define a registry file 'dynamic_hostname' with the hostname there and then define the endpoint dynamically or use a 'Endpoint' artifact in the registry and refer to that endpoint using 'key=..'

          – Jan
          Nov 30 '18 at 15:31





          I am not too familiar with FIX but the config is also configured locally right? So essentially you configure the endpoint still per environment. There are several solutions each with their own drawback: you can define a registry file 'dynamic_hostname' with the hostname there and then define the endpoint dynamically or use a 'Endpoint' artifact in the registry and refer to that endpoint using 'key=..'

          – Jan
          Nov 30 '18 at 15:31


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380521%2fwso2-integrator-how-to-setup-fix-initiator-failover%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents