When Connection parameters are not correct the call to eventQueue.dispatch(....) hangs and never ...

...throws an exception.
Hi,
The code snippet at the bottom works perfectly when the connection parametes such as name of the ads server, the port and Dacs-User-Id is correct.
But as soon as I change the Dacs-User-Id to a an incorrect one, the call to dispatch hangs and if there has been a successful connection prior to connection that makes the code to hang, the successful connection is destroyed and not events(updates) are dispatched from the existing successful connection. So in simple words submitting a connection with erroneous parameters will cause the program to hang and if the Dispatchable.INFINITE_WAIT is changed to 2000 milliseconds then it will return but as the result the call directoryClient.getServices() returns no services and worst of all the perviously successful RSSL-Connections gets corrupted in the same instance of the the app.
I have somehow the same setup for SSL code ( slightly different though ) below which works perfectly if when trying to connect and having a wrong parameter like DACS-User-Id. This means that eventually an exception is thrown and the code would never hang. Also perviously created and existing SSL Connections do not get corrupted and the clients that have registered their interest would easily re-register new insterests and work as expected.
Anyone who could shed some light on this issue? Would appreciated your expreties and help. Many thanks in advance.
In both cases(SSL and RSSL) the session has been creaed using
session = Session.acquire(connectionParameters);
and also
session.createEventSource(..... ) has been created to get a consumer.
try {
eventGroup.dispatch(EventQueue.INFINITE_WAIT);
}
catch (Exception e) {
logger.error("Error on listener thread. Error dispatching Event group.", e);
}
========
RSSL Version
========
try {
request.setMsgType(OMMMsg.MsgType.STREAMING_REQ);
request.setMsgModelType(RDMMsgTypes.DIRECTORY);
OMMAttribInfo attribInfo = pool.acquireAttribInfo();
attribInfo.setFilter(
RDMService.Filter.INFO
| RDMService.Filter.STATE
| RDMService.Filter.GROUP );
request.setAttribInfo(attribInfo);
OMMItemIntSpec spec = new OMMItemIntSpec();
spec.setMsg(request);
EventQueue eventQueue = EventQueue.create("directoryQueue");
directoryHandle = ommConsumer.registerClient(eventQueue, spec, directoryClient, null);
eventQueue.dispatch(Dispatchable.INFINITE_WAIT);
} catch (Exception e) {
//Handling the exception
}
List<RMDSService> services = directoryClient.getServices();
for(RMDSService service : services) {
availableServices.put(service.getName(), service);
}
return services;
Best Answer
-
If the API cannot connect to the ADS server because the wrong IP or wrong RSSL port, the application will receive the LOGIN REFRESH_RESP with the following attributes from the API via the processEvent function.
- Msg Type: MsgType.REFRESH_RESP
- Msg Model Type: LOGIN
- Stream state: OPEN
- Data state: SUSPECT
- Status Code: NONE
- Status Text: "All connections pending"
And the RFA trace file (need to be enabled) shows the following message:
Thread: <your session> Session EventQueueGroup
Connection 0
RSSL Connection failed for <IP>: null //Wrong IP
or
RSSL Connection failed for <IP>: Connection refused: no further information //Wrong Port
I have tested with the RFA Java 7.6.1's StarterConsumer example and it works fine without any freeze or hang, the processEvent receives the above response successfully.
Could you pleaes test with the RFA Java StarterConsumer example?
What is the version of RFA and the Java that you are using?
Why did you code put the eventQueue.dispatch(Dispatchable.INFINITE_WAIT); statement there? Regarding section 9.2.6.1 "Receiving Inbound Events", the dispatch method typically called within a loop. Please see an example in the RFA Java StarterConsumer example.
0
Answers
-
Basically, the API returns the error message as a status response (STATUS_RESP) to the application when an invalid DACS ID is used.
If that DACS ID does not have a permission to access ADS,t he API returns the following to the application and it stops establish a connect to the ADS.
- Stream state: Closed
- Data state: Suspect
- Status Code: USER_UNKNOWN_TO_PERM_SYS
- Status Text: "User <Username> is not registered" or "<Username> unknown to system."
If that DACS ID does not have a permission to request data, The API returns the following message to the application and that item request stream is closed.
- Stream state: Closed
- Data state: Suspect
- Status Code: Not Entitled
- Status Text: <depending on each permission issue>
Example status text: "Access Denied: User req to IDN for Exch - <XXX>" or "A21: DACS denied access to Vendor due to missing Vendor table", etc
Does the application handles the above status messages from the API?
0 -
@Wasin
Waeosir Thanks for your response. I have to let you know that it is not only
the DACS-ID that causes my consumer app to freeze. Anything that makes the connection to go wrong (
worng port number, wrong IP for the ADS.. etc...) causes my consumer
application to freez.In regards to your answer I have to let you know
that the implementation for processEvent (...) of the Client interface does not
even get called for me to check the Status.0 -
Hi @AMofidy-Rouhi I did not receive any updates for a while. Can you replicate the issue with the RFA Java StarterConsumer example?
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 687 Datastream
- 1.4K DSS
- 622 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 680 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛