question

Upvotes
Accepted
129 16 25 31

EMA C++ error Attempt to submit using a registered handle

During the testing of my new non-interactive code, EMA reports error

“Attempt to submit( const UpdateMsg& ) using a registered handle”

To illustrate my usecase, I instructed application to:
(1) create record RIC
(2) create record RIC1
(3) update RIC
(4) update RIC1
(5) drop RIC
(6) create RIC2
(7) create RIC3
(8) update RIC3
(9) update RIC2

The moment I try to update RIC2, it report the error message and below is XML message trace from EMA Logger

TimeStamp: 14:45:58.949 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received RefreshMsg with market domain; Handle = 1000000000000, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:45:58.950 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received RefreshMsg with market domain; Handle = 1000000000001, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:46:22.143 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received UpdateMsg with market domain; Handle = 1000000000000, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:46:23.951 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received UpdateMsg with market domain; Handle = 1000000000001, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:46:35.455 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received StatusMsg with market domain; Handle = 1000000000000, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:46:56.079 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received RefreshMsg with market domain; Handle = 1000000000002, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:46:56.130 
ClientName: ItemCallbackClient 
Severity: Error 
Text: Received an item event without user specified pointer or stream info 
Instance Name Provider_1_1 
RsslReactor 0x0xf77930 
RsslReactorChannel 0x0xf77930 
RsslSocket 14 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:47:09.647 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received RefreshMsg with market domain; Handle = 1000000000003, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:47:23.095 
ClientName: Provider_1_1 
Severity: Verbose 
Text: Received UpdateMsg with market domain; Handle = 1000000000003, user assigned streamId = 0. 
loggerMsgEnd 

loggerMsg 
TimeStamp: 14:47:30.439 
ClientName: Provider_1_1 
Severity: Error 
Text: Attempt to submit( const UpdateMsg& ) using a registered handle. 
loggerMsgEnd  


Turn on EMA XML trace message and found unexpected stream id as below trace log. It looks like after EMA receive close message for "RIC" and the time I create "RIC2", the stream id is positive value "5" instead of negative value for Non-Interactive. I think this may cause the error when I update "RIC2".

<!-- End Message (Channel IPC descriptor = 14) --> 
<!-- Outgoing Message (Channel IPC descriptor = 14) --> 
<!-- Time: 14:46:23:951 --> 
<!-- rwfMajorVer="14" rwfMinorVer="0" --> 
<updateMsg
 domainType="RSSL_DMT_MARKET_PRICE" streamId="-6" 
containerType="RSSL_DT_FIELD_LIST" flags="0x0" updateType="0 
(RDM_UPD_EVENT_TYPE_UNSPECIFIED)" dataSize="35"> 
<dataBody> 
<fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)"> 
<fieldEntry fieldId="-9000" data="476F 2073 6565 206C 6120 6C61 206C 616E 64"/> 
<fieldEntry fieldId="22" data="0C11 B6"/> 
<fieldEntry fieldId="25" data="0C12 44"/> 
</fieldList> 
</dataBody> 
</updateMsg> 

<!-- End Message (Channel IPC descriptor = 14) --> 
<!-- Outgoing Message (Channel IPC descriptor = 14) --> 
<!-- Time: 14:46:35:455 --> 
<!-- rwfMajorVer="14" rwfMinorVer="0" --> 
<statusMsg
 domainType="RSSL_DMT_MARKET_PRICE" streamId="-5" 
containerType="RSSL_DT_NO_DATA" flags="0x28 
(RSSL_STMF_HAS_MSG_KEY|RSSL_STMF_HAS_STATE)" 
dataState="RSSL_DATA_NO_CHANGE" streamState="RSSL_STREAM_CLOSED" 
code="RSSL_SC_NOT_OPEN" text="Closed" dataSize="0"> 
<key flags="0x3 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME)" serviceId="1" name="RIC"/> 
<dataBody> 
</dataBody> 
</statusMsg> 

<!-- End Message (Channel IPC descriptor = 14) --> 
<!-- Outgoing Message (Channel IPC descriptor = 14) --> 
<!-- Time: 14:46:56:079 --> 
<!-- rwfMajorVer="14" rwfMinorVer="0" --> 
<refreshMsg
 domainType="RSSL_DMT_MARKET_PRICE" streamId="5" 
containerType="RSSL_DT_FIELD_LIST" flags="0x148 
(RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_REFRESH_COMPLETE|RSSL_RFMF_CLEAR_CACHE)"
 groupId="0" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" 
code="RSSL_SC_NONE" text="Refresh Completed" dataSize="8"> 
<key flags="0x3 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME)" serviceId="1" name="RIC2"/> 
<dataBody> 
<fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)"> 
<fieldEntry fieldId="22" data="0E03"/> 
</fieldList> 
</dataBody> 
</refreshMsg> 

<!-- End Message (Channel IPC descriptor = 14) --> 
<!-- Incoming Message (Channel IPC descriptor = 14) --> 
<!-- Time: 14:46:56:130 --> 
<!-- rwfMajorVer="14" rwfMinorVer="0" --> 
<closeMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="5" containerType="RSSL_DT_NO_DATA" flags="0x0" dataSize="0"> 
<dataBody> 
</dataBody> 
</closeMsg> 


I'm using Elektron-SDK 1.0.8.
Do you know what can cause the error message and how to resolve the issue?

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apierrorc++stream-idnon-interactive
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.

Seed question by Moragodkrit

1 Answer

· Write an Answer
Upvotes
Accepted
7.6k 15 6 9

@Akechi Sato

This issue has been fixed in the lastest version of Elektron-SDK C++ 1.1.0. To confirm the issue I have tested the same flow by modifying NIProvider300 from EMA example folder to replicate the error in version 1.0.8 you currently use. Below is the my codes UInt64 Int64 RICHandle = 1000001;

provider.submit(RefreshMsg()
                .serviceName("API_ADH_NI_PUB").name("RIC")
                .state(OmmState::OpenEnum, OmmState::OkEnum, 
                OmmState::NoneEnum, "UnSolicited Refresh Completed")
                .payload(FieldList()
                       .addReal(22, 3990, OmmReal::ExponentNeg2Enum)
                       .addReal(25, 3994, OmmReal::ExponentNeg2Enum)
                       .addReal(30, 9, OmmReal::Exponent0Enum)
                       .addReal(31, 19, OmmReal::Exponent0Enum)
                       .complete())
                .complete(), RICHandle);
sleep(1000);

provider.submit(RefreshMsg().serviceName("API_ADH_NI_PUB").name("RIC1")
        .state(OmmState::OpenEnum, OmmState::OkEnum, OmmState::NoneEnum, "UnSolicited Refresh Completed")
        .payload(FieldList()
        .addReal(22, 3990, OmmReal::ExponentNeg2Enum)
        .addReal(25, 3994, OmmReal::ExponentNeg2Enum)
        .addReal(30, 9, OmmReal::Exponent0Enum)
        .addReal(31, 19, OmmReal::Exponent0Enum)
        .complete())
        .complete(), RICHandle + 1);
sleep(1000);

for (Int32 i = 0; i < 1; i++)
{
    provider.submit(UpdateMsg().serviceName("API_ADH_NI_PUB").name("RIC")
            .payload(FieldList()
            .addReal(22, 3391 + i, OmmReal::ExponentNeg2Enum)
            .addReal(30, 10 + i, OmmReal::Exponent0Enum)
            .complete()), RICHandle);
    provider.submit(UpdateMsg().serviceName("API_ADH_NI_PUB").name("RIC1")
             .payload(FieldList()
             .addReal(22, 3391 + i, OmmReal::ExponentNeg2Enum)
             .addReal(30, 10 + i, OmmReal::Exponent0Enum)
             .complete()), RICHandle + 1);
    sleep(1000);
}


provider.submit(StatusMsg().serviceName("API_ADH_NI_PUB").name("RIC")
         .state(OmmState::ClosedEnum, OmmState::SuspectEnum, OmmState::NotFoundEnum,"Closed by NIPub"), RICHandle);


provider.submit(RefreshMsg().serviceName("API_ADH_NI_PUB").name("RIC2")
        .state(OmmState::OpenEnum, OmmState::OkEnum, OmmState::NoneEnum, "UnSolicited Refresh Completed")
        .payload(FieldList()
        .addReal(22, 3990, OmmReal::ExponentNeg2Enum)
        .addReal(25, 3994, OmmReal::ExponentNeg2Enum)
        .addReal(30, 9, OmmReal::Exponent0Enum)
        .addReal(31, 19, OmmReal::Exponent0Enum)
        .complete())
        .complete(), RICHandle + 2);

sleep(1000);


provider.submit(RefreshMsg().serviceName("API_ADH_NI_PUB").name("RIC3")
        .state(OmmState::OpenEnum, OmmState::OkEnum, OmmState::NoneEnum, "UnSolicited Refresh Completed")
        .payload(FieldList()
           .addReal(22, 3990, OmmReal::ExponentNeg2Enum)
           .addReal(25, 3994, OmmReal::ExponentNeg2Enum)
           .addReal(30, 9, OmmReal::Exponent0Enum)
           .addReal(31, 19, OmmReal::Exponent0Enum)
           .complete())
        .complete(), RICHandle + 3);
sleep(1000);


 for (Int32 i = 0; i < 1; i++)
 {
     provider.submit(UpdateMsg().serviceName("API_ADH_NI_PUB").name("RIC2")
             .payload(FieldList()
                     .addReal(22, 3391 + i, OmmReal::ExponentNeg2Enum)
                     .addReal(30, 10 + i, OmmReal::Exponent0Enum)
                     .complete()), RICHandle + 2);
    
     provider.submit(UpdateMsg().serviceName("API_ADH_NI_PUB").name("RIC3")
             .payload(FieldList()
             .addReal(22, 3391 + i, OmmReal::ExponentNeg2Enum)
             .addReal(30, 10 + i, OmmReal::Exponent0Enum)
             .complete()), RICHandle + 3);
    sleep(1000);
}
                              

I can replicate the same error in 1.0.8 and it work correctly in 1.1.0. Development has re-implement the codes that manage the non interactive provider stream in the latest version. Please upgrade to the new version of Elektron-SDK 1.1.0 to fix the issue.

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.

Just rebuild the app with 1.1.0 and it fixed the issue. Thanks for your help.

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.