Skip to content

EMA Java cannot connect to WebSocket endpoint with DictionaryType::ChannelDictionary #338

Description

@wasin-waeosri

Problem Statement

EMA Java (3.9.2.0, RTSDK version 2.3.2 L1) cannot connect to RTDS using a WebSocket connection using DictionaryType::ChannelDictionary even I have set the ADS *ads*enableMultipartDictionary : True. The log shows the following error message:

Failed to convert JSON message: JSON Converter parse error: Invalid UTF-8 middle byte 0x22
at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 3187]

The EMA C++ 2.3.2.L1 does not encounter the issue and can connect to ADS successfully.

Detail:

  • EMA Java (RTSDK 2.3.2L1) ex180_MP_Websocket
  • ADS 3.8.2.L1
  • JDK version 17

Replication Steps:

  1. Config ADS cnf file to enable the multipart dictionary (*ads*enableMultipartDictionary : True)
  2. Restart ADS
  3. Set the Consumer_6 to use Dictionary_1 (<Dictionary value="Dictionary_1"/>)
  4. Set the Channel_6 to connect to the ADS
  5. Run ex180_MP_Websocket
  6. Got an error message, while the EMA C++ works fine.

EmaConfig.xml file

<Consumer>
	<Name value="Consumer_6"/>
	<Channel value="Channel_6"/>
	<Dictionary value="Dictionary_1"/>
	<XmlTraceToStdout value="1"/>
	<DefaultServiceID value="1"/>
	<DictionaryRequestTimeOut value="999999"/>
</Consumer>

<Channel>
	<Name value="Channel_6"/>
	<ChannelType value="ChannelType::RSSL_WEBSOCKET"/>
	<CompressionType value="CompressionType::None"/>
	<GuaranteedOutputBuffers value="5000"/>
	<Host value="rdc-pln-vm-adhads-1.gpic.int.refinitiv.com"/>
	<Port value="15000"/>
	<WsMaxMsgSize value="61440"/>
	<WsProtocols value="tr_json2"/>
</Channel>

<Dictionary>
	<Name value="Dictionary_1"/>
	<DictionaryType value="DictionaryType::ChannelDictionary"/>
</Dictionary>

Error message:

{"ID":1,"Type":"Close","Domain":"Login"}
Failed to convert JSON message: JSON Converter parse error: Invalid UTF-8 middle byte 0x22
at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 3187]

Attachment Files

  • EMA Java trace log when the problem occurs: ex180_ws.log
  • EMA C++ trac log that works fine: EMA_CPP_trace.zip

ex180_ws.log
EMA_CPP_trace.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions