I understand that processEvent() method is being called when we subscribe to a RIC.
Question is that when a RIC doesn't have data, why processEvent() being called infinitely? Is there a way to set a timestemp?
New posts are disabled while we improve the user experience.
You can browse the site, or for urgent issues, raise a query at MyAccount.
Hello @rudygunawan
Please be informed that when the infrastructure sends a status indicating that the watched item is stale, RFA assumes that the server will recover the item. The item remains stale until the infrastructure automatically recovers the item. The application does not need to re-subscribe that item, the API will do for the application.
If you want to unsubscribe item, you can call the following function to unregister an uninterested item handle object.
MarketDataSubscriber.unregisterClient(Handle itemHandle)
Please be informed that the application can configure the item subscription request timeout via your SSL Connection Node "marketDataItemSubTimeout" attribute
However, this timeout means the API does not receive "any messages" from the infrastructure. The Stale status does not count as "request timeout" because the infrastructure sends "Status Message" to inform the API that the item is staled.
In general, if you share the same client when the app calls the registerClient method, you could receive other event-type in the processEvent callbacks. For example, when it has a service change, the connection change from the server. RFA can generate another Logger message, and the app will get the events in processEvent callback.
The app should check the event type and then process the event type accordingly. For example, if it receives OMMItemEventEnum, it should be related to data updates for the RIC request. You can find sample codes to process events from our examples, such as StartConsumer(RFA C++), under the examples folder.
Are you using the Market Data interface (SSL connection) or the OMM (RSSL connection)?
Not sure that this is the case that the application does not print any data because it can't find some specific fields in the update message. Or there is the case that the update payload is blank/empty.
I would suggest you enable IPCTrace (set ipcTraceFlags) in the RFA Java config to verify the raw data the application received from the server.
You can also test the same RIC with RFA Java examples such as MDSub(MD Interface) or QuickStartConsumer(OMM Interface) provided in the RFA Java package. It should help confirm that you receive the same output or not.
I'm using SSL connection.
This specific RIC is comprised of multiple RICs. So some of the fields may not be available.
In this case anyway to stop keep listening?
I think it would depend on your app logic when it can't parse the fields or find it on the dict. API may throw some exceptions, and if your app catches it, it may skip and does not print the fields and their value. I can't confirm. Anyway, testing with an example app to compare the result may help you verify the issue.
Hello @rudygunawan
Please be informed that you can configure the following RFA Java configurations to enable the log file
Hello @rudygunawan
The RFA Java configurations can be configured in various ways. I strongly suggest you check with your application development team to verify how your application configures RFA Java parameters.
XML Configuration file.
You can use the config_exporter.jar tool to export your RFA Java configurations to the XML file.
$>java -jar config_exporter.jar [-system | -user] -file <pathNameOfFile>
Then you can change the following parameters of your SSL Connection node to enable the log file:
<node name="Connections"> <map /> <node name="pageSSLConn"> <map> <entry key="connectionType" value="SSL" /> <entry key="portNumber" value="8101" /> <entry key="dacs_CbeEnabled" value="true" /> <entry key="dacs_GenerateLocks" value="true" /> <entry key="dacs_SbePubEnabled" value="true" /> <entry key="dacs_SbeSubEnabled" value="true" /> <entry key="downloadDataDict" value="true" /> <entry key="serverList" value="localhost" /> <entry key="ipcTraceFlags" value="7" /> <entry key="logFileName" value="<path to log file>" /> <entry key="mountTrace" value="true" /> <entry key="enumTypeFile" value="/var/triarch/enumtype.def" /> <entry key="masterFidFile" value="/var/triarch/appendix_a" /> </map> </node> </node>
After modifying the above configurations, you can use the config_loader.jar tool to populate the configuration back to the RFA Java API and then restart the application to make the changes take effect.
$>java –jar config_loader.jar -file <pathNameOfFile>
Please note that the RFA Java tools are available at <RFA Java package>\Tools folder.
GUI Tool.
You may use the GUI Tool (config_editor.bat, config_editor.jar, or config_editor.ksh) to change the above configurations.
Then restart the application to make the changes take effect.
Please note that the RFA Java tools are available at <RFA Java package>\Tools folder.
ConfigDB
The RFA Java Configurations also can be configured with the API's ConfigDB object in the application source code.
import com.reuters.rfa.config.ConfigDb; ConfigDb configDb = new ConfigDb(); ... configDb.addVariable("<SSLNamespace>.Connections.sslConConnection.mountTrace","true"); configDb.addVariable("<SSLNamespace>.Connections.sslConConnection.ipcTraceFlags","7"); configDb.addVariable("<SSLNamespace>.Connections.sslConConnection.logFileName","<path to log file>")
Then re-built your application and restart the application to make the changes take effect.
@wasin.waeosri @moragodkrit.chumsri_1 thank you for the answers.
I have enabled the ipx tracing and got the logs.
Is there a way to set the timeout when calling registerClient or from session level?
Hello @rudygunawan
The trace file shows that the API received the stale message (status State "STALE" and status Text "Allow suspect data is disabled") from the backend. The stale message means the data is not available now. It is not the item request timeout issue.
I strongly suggest you contact your Market Data team to help you verify why the infrastructure returns the stale message to the API.
thanks for the reply, I'll check with Market Data team.
Could you also answer the other question:
Is there a way to set the timeout when calling registerClient or from session level (when status state is 'STALE', don't want to keep on listening )?