question

Upvotes
Accepted
3 0 0 1

Receiving close message

Randomly receiving a close message after the application is running for an hour or so. The xml trace indicates the the stream was closed even though this close is not initiated by the application.

<!-- Outgoing Message (Channel IPC descriptor = 13) -->

<!-- Time: 12:28:35:403 -->

<!-- rwfMajorVer="14" rwfMinorVer="1" -->

<closeMsg domainType="RSSL_DMT_LOGIN" streamId="1" containerType="RSSL_DT_NO_DATA" flags="0x0" dataSize="0">

<dataBody>

</dataBody>

</closeMsg>


<!-- End Message (Channel IPC descriptor = 13) -->

<!-- rsslCloseChannel Connection closed (Channel IPC descriptor = 13) -->

<!-- Time: 12:28:35:413 -->


Any help to understand the problem would be of great.


Thanks,

Ketul

#technologyema-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 @ketul.barot

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Upvotes
Accepted
79.4k 253 52 74

@ketul.barot

The login close message is sent by the API or application. Typically, the OmmConsumer will send the login close message when it is uninitialized or destructed.

For example, the following code deletes the OmmConsumer after running for 5 seconds.

try { 
        AppClient client;
        OmmConsumer* _pConsumer = new OmmConsumer( OmmConsumerConfig().host("localhost:9998").username("user"));
        UInt64 handle = _pConsumer->registerClient( ReqMsg().serviceName( "DIRECT_FEED" ).name( "JPY=" ), client );
     
            sleep(5000);                // API calls onRefreshMsg(), onUpdateMsg(), or onStatusMsg()
         
            delete _pConsumer;
            sleep(100000);
}

The trace log will show that the API sent the login close message to the server.

<!-- Outgoing Message (Channel IPC descriptor = 260) -->
<!-- Time: 12:01:43:244 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<closeMsg domainType="RSSL_DMT_LOGIN" streamId="1" containerType="RSSL_DT_NO_DATA" flags="0x0" dataSize="0">
    <dataBody>
    </dataBody>
</closeMsg>

Please make sure the OmmConsumer wasn't destructed or the application didn't send the login close message by using the login handle.

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
22.2k 59 14 21

Hi @ketul.barot,

Can you tell us little bit more about the application -

1. Is it a new application, and has been running in the past?

2. What infrastructure are you connecting to - local RTMDS or RTO cloud?

A close on the login stream typically means that your session has expired. Is something else happening to the application at that instance?

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
3 0 0 1

Hi @Gurpreet ,

Application has been running in the past.

Connecting to local RTMDS.

The session is active for an hour or so and then suddenly receive the closeMsg nothing else happening. This is the login request message I sent,

<requestMsg domainType="RSSL_DMT_LOGIN" streamId="1" containerType="RSSL_DT_NO_DATA" flags="0x4 (RSSL_RQMF_STREAMING)" dataSize="0">

<key flags="0x22 (RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_ATTRIB)" name="stats" attribContainerType="RSSL_DT_ELEMENT_LIST">

<attrib>

<elementList flags="0x8 (RSSL_ELF_HAS_STANDARD_DATA)">

<elementEntry name="ApplicationId" dataType="RSSL_DT_ASCII_STRING" data="256"/>

<elementEntry name="ApplicationName" dataType="RSSL_DT_ASCII_STRING" data="ema"/>

<elementEntry name="Position" dataType="RSSL_DT_ASCII_STRING" data="A.B.C.D/net"/>

</elementList>

</attrib>

</key>

<dataBody>

</dataBody>

</requestMsg>


And this is the refresh message,

<refreshMsg domainType="RSSL_DMT_LOGIN" streamId="1" containerType="RSSL_DT_NO_DATA" flags="0x28 (RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_SOLICITED)" groupId="0" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text="" dataSize="0">

<key flags="0x26 (RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_NAME_TYPE|RSSL_MKF_HAS_ATTRIB)" name="stats" nameType="1" attribContainerType="RSSL_DT_ELEMENT_LIST">

<attrib>

<elementList flags="0x8 (RSSL_ELF_HAS_STANDARD_DATA)">

<elementEntry name="AllowSuspectData" dataType="RSSL_DT_UINT" data="1"/>

<elementEntry name="ApplicationId" dataType="RSSL_DT_ASCII_STRING" data="256"/>

<elementEntry name="DisableDataConversion" dataType="RSSL_DT_UINT" data="0"/>

<elementEntry name="InstanceId" dataType="RSSL_DT_ASCII_STRING" data=""/>

<elementEntry name="ProvidePermissionExpressions" dataType="RSSL_DT_UINT" data="1"/>

<elementEntry name="ProvidePermissionProfile" dataType="RSSL_DT_UINT" data="1"/>

<elementEntry name="Role" dataType="RSSL_DT_UINT" data="0"/>

<elementEntry name="SingleOpen" dataType="RSSL_DT_UINT" data="1"/>

<elementEntry name="SupportProviderDictionaryDownload" dataType="RSSL_DT_UINT" data="0"/>

<elementEntry name="SupportBatchRequests" dataType="RSSL_DT_UINT" data="7"/>

<elementEntry name="SupportViewRequests" dataType="RSSL_DT_UINT" data="0"/>

</elementList>

</attrib>

</key>

<dataBody>

</dataBody>

</refreshMsg>

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
22.2k 59 14 21

Hi @ketul.barot,

Nothing exceptional is evident from these API log messages. Can you request your market data administrator to enable the logs on the ADS, so that we can see why your app gets logged out.

For the sake of test, can you please use one of the basic EMA example applications like 100 Consumer and see if the behavior is same, and the example receives a login closed message as well.

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
3 0 0 1

@Jirapongse Yes indeed my application was exiting and that was destructing OmmConsumer. Fixed the application exit and it resolved the issue. Thanks everyone for the help

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.