question

Upvotes
Accepted
1 0 1 1

processEvent() being called infinitely

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?

treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @rudygunawan,

Thank you for your participation in the forum.

Is one of the replies below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

@rudygunawan

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
24.7k 54 17 14

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

  • Attribute: marketDataItemSubTimeout
  • Type: Integer
  • Default: 15000
  • Description: Timeout value (in milliseconds) to wait for receiving the market data item subscription.

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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
7.6k 15 6 9

@rudygunawan

  • Do you mean you still get Item events when the RIC has no update?
  • Not sure are you RFA C++ or Java?


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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 1 1

Hi @moragodkrit.chumsri_1,

  • Do you mean you still get Item events when the RIC has no update? Correct, you can see from below screenshot, it's printing the same RIC and got no update
  • Not sure are you RFA C++ or Java? Java



untitled.png (467.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@rudygunawan

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.

@moragodkrit.chumsri_1


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?

@rudygunawan

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.

Show more comments
Upvotes
24.7k 54 17 14

Hello @rudygunawan

Please be informed that you can configure the following RFA Java configurations to enable the log file

  • <namespace>/Connections/<Connection Name>/ipcTraceFlags = 7
  • <namespace>/ Connections/<Connection Name>/mountTrace = True
  • <namespace>/ Connections/<Connection Name>/logFileName=<path to log file>


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@wasin.waeosri,

Sorry which file is this?

Upvotes
24.7k 54 17 14

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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 1 1

@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?


1612158078230.png (218.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
24.7k 54 17 14

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 1 1

@wasin.waeosri,


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 )?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.