Simulate Force Logout From DACs StatusMsg
Hi,
Regarding the question i asked in a separate thread regarding "Force Logout from DACs" in https://community.developers.refinitiv.com/questions/108445/force-logout-from-dacs-with-warmstandbymode-servic.html.
I need to simulate Force Logout from DACs, in a test provider application to verity my application responds it as expected.
I submit market price updates in a loop, time to time i send force logout messages as below. But it doesn't work as expected.
I am expecting this message to receive, but i am not getting it in my application logs. Can you please correct whatever i am doing wrong ? I am using ema3.6.6.L1. My application crashed recently whenever i was receiving same message (i've mentioned it in https://community.developers.refinitiv.com/questions/109592/application-crash-at-logincallbackclientprocesssta.html)
}FtGroupId [100] SessionId [1] IsActiveSession [TRUE]{Output: Timestamp: 20230922-23:35:54.894551 StatusMsg
streamId="1"
domain="Login Domain"
state="Closed / Suspect / Not entitled / 'Force Logout from DACS.'"
name="AQIC5wM2LY4SfcyP9WdYMradVfbwJqNtsyiNU11bfGHX0eU%3D%40AAJTSQACMTAAAlNLABM1NzM1NDYxNDM0NTE5Mjk5NzgzAAJTMQACMjc%3D%23"
nameType="1"
StatusMsgEnd
}
for (SubscriptionInfo subscriptionInfo : appClient.m_userSubscriptionInfo)
{
std::cout << "Force logout user for handle: " << subscriptionInfo.handle << std::endl;
subscriptionInfo.providerEvent->getProvider().submit( StatusMsg()
.domainType(subscriptionInfo.domainType)
.name(subscriptionInfo.name.c_str())
.nameType(1)
.state(OmmState::ClosedEnum, OmmState::SuspectEnum, OmmState::DacsDownEnum, "Force Logout from DACS."),
subscriptionInfo.providerEvent->getHandle() );
}
Best Answer
-
Thank you for reaching out to us.
You need to store the handle of the login stream and then use it to send the login close message.
1. Store the login handle
void AppClient::processLoginRequest( const ReqMsg& reqMsg, const OmmProviderEvent& event )
{
event.getProvider().submit(RefreshMsg().domainType(MMT_LOGIN).name(reqMsg.getName()).nameType(USER_NAME).complete().
attrib( ElementList().complete() ).solicited( true ).state( OmmState::OpenEnum, OmmState::OkEnum, OmmState::NoneEnum, "Login accepted" ) ,
event.getHandle() );
loginHandle = event.getHandle();
}2. Then, use it to send the login close message
provider.submit(StatusMsg()
.domainType(MMT_LOGIN)
.state(OmmState::ClosedEnum, OmmState::SuspectEnum, OmmState::NotAuthorizedEnum, "Force Logout from DACS."),
appClient.loginHandle);You need to send just one login close message.
You can enable tracing on the consumer side to verify the retrieved message.
<Consumer>
...
<XmlTraceToStdout value="1"/>
</Consumer>The message will look like this:
<statusMsg domainType="RSSL_DMT_LOGIN" streamId="1" containerType="RSSL_DT_NO_DATA" flags="0x20 (RSSL_STMF_HAS_STATE)" dataState="RSSL_DATA_SUSPECT" streamState="RSSL_STREAM_CLOSED" code="RSSL_SC_NOT_ENTITLED" text="Force Logout from DACS." dataSize="0">
<dataBody>
</dataBody>
</statusMsg>0
Answers
-
Thanks for the response @Jirapongse .
I can see statusMsg received in XmlTrace file, but for some reason,
OmmConsumerClient::
onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& consumerEvent )is not getting fired ? Note that
I can see it is getting fired for DomainType: 6,
e.g.
STDOUT"," ","DomainType: 6, StatusMsg: StreamState: 4, DataState: 2, StatusText: Login stream was closed.",
0 -
You may need to register to retrieve login events.
Please refer to the 330_Login_Streaming example in the package.
The 330_Login_Streaming showcases usage of login stream in OMM Consumer.
It demonstrates opening of login stream as well as its processing. Having
a login stream open is useful for consumer applications willing to do
Off Stream Posting and or knowing the state of its connectivity to server.0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛