26 1 1 10

Simulate Force Logout From DACs StatusMsg


Regarding the question i asked in a separate thread regarding "Force Logout from DACs" in

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

}FtGroupId [100] SessionId [1] IsActiveSession [TRUE]{Output: Timestamp: 20230922-23:35:54.894551 StatusMsg
    domain="Login Domain"
    state="Closed / Suspect / Not entitled / 'Force Logout from DACS.'"

for (SubscriptionInfo subscriptionInfo : appClient.m_userSubscriptionInfo)
std::cout << "Force logout user for handle: " << subscriptionInfo.handle << std::endl;
subscriptionInfo.providerEvent->getProvider().submit( StatusMsg()
.state(OmmState::ClosedEnum, OmmState::SuspectEnum, OmmState::DacsDownEnum, "Force Logout from DACS."),
subscriptionInfo.providerEvent->getHandle() );
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.

1 Answer

· Write an Answer
73k 226 49 71


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

            .state(OmmState::ClosedEnum, OmmState::SuspectEnum, OmmState::NotAuthorizedEnum, "Force Logout from DACS."), 

You need to send just one login close message.

You can enable tracing on the consumer side to verify the retrieved message.

   <XmlTraceToStdout value="1"/>

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">

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.

Thanks for the response @Jirapongse .

I can see statusMsg received in XmlTrace file, but for some reason,

onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& consumerEvent )

is not getting fired ? Note that

I can see it is getting fired for DomainType: 6,


STDOUT"," ","DomainType: 6, StatusMsg: StreamState: 4, DataState: 2, StatusText: Login stream was closed.",

Jirapongse avatar image Jirapongse thilinaillangasinghe


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.

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.