[
https://issues.apache.org/jira/browse/CAMEL-15497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
AjayPatil2611 updated CAMEL-15497:
----------------------------------
Comment: was deleted
(was: do you mean that if we are using the camel version 2.24.3 then we should
use FIX version 3.6
as we are using the camel version 2.24.3 and fix version is 4.4, will that be
any consequences in the code wise , please let me know)
> Unable to load the External config file for QuickFix component
> --------------------------------------------------------------
>
> Key: CAMEL-15497
> URL: https://issues.apache.org/jira/browse/CAMEL-15497
> Project: Camel
> Issue Type: Improvement
> Components: camel-quickfix
> Affects Versions: 2.24.3
> Environment: OS : Windows10/Ubuntu 20.04/18.04
> JDK : AdoptJdk/OpenJdk1.8
> Karaf: 4.2.8
> Camel Version : 2.24.3
> Fix Version : 4.4 on wards.
> Reporter: AjayPatil2611
> Priority: Minor
> Fix For: 3.6.0
>
> Attachments: Error screenshot.png, image-2020-09-03-12-46-25-226.png,
> image-2020-09-03-14-34-43-573.png, image-2020-09-03-14-35-51-225.png
>
>
> Hi Team,
> @[~davsclaus] @[~acosentino]
> {color:#de350b}*Versions used (Karaf 4.2.8 , camel 2.24.3 ,FIX 4.4) (drop
> down not showing the Fix 4.4 so selected Future /Latest version available*
> {color}
> i am trying to connect the quick-fix component but required config.cfg file
> (normally it will be there in classpath), we want to externalize the
> config.cfg because clients can change the quick-fix(raptor) component details
> such as (below details might very form environment to environment like
> DEV/QA/SDN etc.
> *SenderCompID/TargetCompID/SocketConnectPort etc.*
> *But when try to load from external file* i.e config.cfg. getting error as
> unable to load .Even though file path, *i am able to load it
> properly(karaf/etc/config.cfg*)*[image attached*]
> but {color:#de350b}*when i add it to the path with quick-fix component its
> throwing the error that unable to load.*{color}
> Example:
> normally we load it from classpath,*which works perfectly below point 1 and
> 2*.
> Route:
> (client/config.cfg in the classpath src/main/resource/client/config.cfg)
> *1.*
> .to("quickfix:client/config.cfg?sessionID=FIX.4.4:BANZAI->EXEC")
> *2.*
> from("quickfix:client/config.cfg?sessionID=FIX.4.4:BANZAI->EXEC&lazyCreateEngine=false&exchangePattern=InOut")
> but if you see above client/config.cfg is in classpath of our project.
> {color:#de350b}*but want to externalize it and place it inside the karaf/etc
> like other .cfg/.properties file but which is not working.Please do needful
> as its affecting our release also*{color}
> (as usual ,we are externalizing this property for other keys to read by using
> <cm:property-placeholder)
> fixprotocol.cfg
> #topic or Queue configuration
> Key=value
> Key1=value1
> +*{color:#de350b}#for fix{color}*+
> *{color:#57d9a3}cfg.name={color}config.cfg*
> *{color:#57d9a3}cfg.path.name{color}=karaf.etc*
> *Source code Route:*
> public class FixClientRouter extends RouteBuilder {
> @PropertyInject(value = {color:#57d9a3}"cfg.name{color}")
> private String cfgFileName;
> @PropertyInject(value = "{color:#57d9a3}cfg.path.name{color}")
> private String cfgpathName;
> @Override public void configure() throws Exception {
> String externalPath=System.getProperty(cfgpathName) + File.separator +
> cfgFileName;
> */*output exernalPath=*
>
> *C:\Ajay\MyDocs\IntegrationProject\DIS\karafsetup\apache-karaf-4.2.8\etc\config.cfg*
> **/*
> from(ENDPOINT_FIX_COMPONENT)
> .routeId(ENDPOINT_FIX_COMPONENT_ROUTEID)
> .log(LoggingLevel.INFO, LOG_MSG, "fix protocol:connecting to raptor ")
> .doTry()
> */* Using the existing(created in second route /new session*
> *to explicitly send the on an EVENT (Based on Request)*
> **/*
> {color:#de350b}*.to("quickfix:"+externalPath+"?sessionID=FIX.4.4:BANZAI->EXEC")//not
> working //.to("quickfix:file:"+str+"?sessionID=FIX.4.4:BANZAI->EXEC") //not
> working*{color}
> .log(LoggingLevel.INFO,"fix converted data sent to raptor
> successfully!!!!!")
> .endDoTry()
> .doCatch(Exception.class)
> //............logs
> .end()
> .end();
> {color:#de350b}*/*For reply from Raptor/IRIS and Session Creation,*{color}
> {color:#de350b} *two way communication- Keep Establishing the communication
> on bundle start)*{color}
> {color:#de350b} **/*{color}
>
> *from("quickfix:"+externalPath+"?sessionID=FIX.4.4:BANZAI->EXEC&lazyCreateEngine=false&exchangePattern=InOut")*
>
> .routeId(ENDPOINT_RAPTOR_CONNECTION_ROUTEID)
> .filter(PredicateBuilder.or( header(QuickfixjEndpoint.EVENT_CATEGORY_KEY)
> .isEqualTo(QuickfixjEventCategory.AdminMessageSent),
> header(QuickfixjEndpoint.EVENT_CATEGORY_KEY)
> .isEqualTo(QuickfixjEventCategory.AppMessageSent),
> header(QuickfixjEndpoint.EVENT_CATEGORY_KEY)
> .isEqualTo(QuickfixjEventCategory.AdminMessageReceived),
> header(QuickfixjEndpoint.EVENT_CATEGORY_KEY)
> .isEqualTo(QuickfixjEventCategory.AppMessageReceived)))
> *.log(LoggingLevel.INFO, LOG_MSG, "heartBeat ...........=${body}")*
> .end();
> Error:
> C*aused by: java.lang.IllegalArgumentException: Could not load
> [file:C:\Ajay\MyDocs\IntegrationProject\DIS\karafsetup\apache-karaf-4.2.8\etc\config.cfgat|file:///C:/AjayMyDocsIntegrationProjectDISkarafsetupapache-karaf-4.2.8etcconfig.cfgat]
>
> org.apache.camel.component.q{color:#de350b}uickfixj.QuickfixjEngine.loadSettings{color}(QuickfixjEngine.java:255)
> ~[?:?]at
> org.apache.camel.component.quickfixj.{color:#de350b}QuickfixjComponent.createEndpoint(QuickfixjComponent.java:79)
> ~[?:?]at{color}*
> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:130)
> ~[!/:2.24.3]at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:705)
> ~[!/:2.24.3]at
> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80)
> ~[!/:2.24.3]at
> org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:227)
> ~[!/:2.24.3]at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
> ~[!/:2.24.3]at
> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:122)
> ~[!/:2.24.3]at
> org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
> ~[!/:2.24.3]at
> org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
> ~[!/:2.24.3]at
> org.apache.camel.model.ProcessorDefinition.createProcessor(ProcessorDefinition.java:518)
> ~[!/:2.24.3]at
> org.apache.camel.model.ProcessorDefinition.createOutputsProcessorImpl(ProcessorDefinition.java:481)
> ~[!/:2.24.3]at
> org.apache.camel.model.ProcessorDefinition.createOutputsProcessor(ProcessorDefinition.java:448)
> ~[!/:2.24.3]at
> org.apache.camel.model.TryDefinition.createProcessor(TryDefinition.java:77)
> ~[!/:2.24.3]at
> org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:569)
> ~[!/:2.24.3]at
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:530)
> ~[!/:2.24.3]at
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:240)
> ~[!/:2.24.3]at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1349)
> ~[!/:2.24.3]... 25 more
> !image-2020-09-03-12-46-37-214.png!
> Thanks
> Ajay Patil
--
This message was sent by Atlassian Jira
(v8.3.4#803005)