question

Upvotes
Accepted
13 2 8 7

ETA Consumer - Posting data to Contribution Channel (sample) doesn't work

It' has been a long time that I've been trying run ETA RCC, because EMA RCC isn't able to contribute more than one RIC at time.

I downloaded ETA RCC sample (va-consumerc-ontribution.zip) and I've gotten to build without errors, just to you know I follow the bellow steps:

- I edited CMakeLists.txt from Application folder (/Real-Time-SDK/Cpp-C/Eta/Applications/CMakeLists.txt) accordingly readme file in sample folder.

- Due to ETA RCC sample doesn't have its own CMakeLists.txt, I've had to copy one from VAConsumer sample and apply small changes on file in order to build ETA RCC sample.

Bellow you're going to see the error when I run ETA RCC sample (VAConsumerContribution):

sh-4.2# ./VAConsumerContribution -tcp contrib1-emea1.platform.refinitiv.com:443 -uname GE-A-01329598-3-3580 -trceUser GE-A-01329598-3-3580 -trcePass <MY_OBFUSCATE_PASSWORD> -trcePostItem NTC010131=REUL -tunnel
Connections:
        contrib1-emea1.platform.refinitiv.com:443
        Contribution Channel Details:
                tunnel: TRUE
                trceUser: GE-A-01329598-3-3580
                trcePass: <MY_OBFUSCATE_PASSWORD>
                trcePostItem: NTC010131=REUL

Adding connection to contrib1-emea1.platform.refinitiv.com:443...

Connection up! Channel fd=7

Connection down, reconnecting.  Channel fd=7
        Error text: </opt/refinitiv/Real-Time-SDK/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:678> Error:1002 ipcRead() failure. Connection reset by peer


Connection up! Channel fd=7

Connection down, reconnecting.  Channel fd=7
        Error text: </opt/refinitiv/Real-Time-SDK/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:678> Error:1002 ipcRead() failure. Connection reset by peer

Do you know how I could overcome that issue? I've also run VAConsumer with the same access point and it ran normally. You may see bellow:

sh-4.2# ./VAConsumer -encrypted contrib1-amers1.platform.refinitiv.com:443 DDS_TRCE -uname GE-A-01329598-3-3580 -passwd <MY_OBFUSCATE_PASSWORD> -tunnel -offpost
Connections:
        contrib1-amers1.platform.refinitiv.com:443 DDS_TRCE
                MarketPriceItems:
                MarketByOrderItems:
                MarketByPriceItems:
                YieldCurveItems:
                MarketPriceItems (Private Stream):
                MarketByOrderItems (Private Stream):
                MarketByPriceItems (Private Stream):
                YieldCurveItems (Private Stream):

Adding connection to contrib1-amers1.platform.refinitiv.com:443...

Connection up! Channel fd=7


Received Login Response
        State: Open/Ok/None - text: ""


Received Source Directory Response:     State: Open/Ok/None - text: ""

Received serviceName: DDS_TRCE

        Service State: Up

Opened Tunnel Stream.
Received RsslTunnelStreamStatusEvent for stream "VAConsumer", with Stream ID 1000 and State: Open/Ok/None - text: ""



SENDING POST WITH MESSAGE:
        streamId = 1
        postId   = 1
        seqNum   = 1
Segmentation fault


elektronrefinitiv-realtimeelektron-sdkrrteta-apielektron-transport-apicontributionsrcc-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.

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@Bruno.Leal

I am able to replicate the issue. The code in VAConsumerContribution is quite different from the VAConsumer. Therefore, I have modified it to use the reactorConnectionList instead.

You need to modify the following section in the main function (rsslConsumerContribution.c).

        /* Initialize connection options. */
        for(i = 0; i < channelCommandCount; ++i)
        {
                ChannelCommand *pCommand = &chanCommands[i];
                RsslReactorConnectOptions *pOpts = &pCommand->cOpts;
                RsslReactorConnectInfo *pInfo = &pCommand->cInfo;

                pCommand->pRole = (RsslReactorChannelRole*)&consumerRole;
                pInfo->rsslConnectOptions.guaranteedOutputBuffers = 500;
                pInfo->rsslConnectOptions.majorVersion = RSSL_RWF_MAJOR_VERSION;
                pInfo->rsslConnectOptions.minorVersion = RSSL_RWF_MINOR_VERSION;
                pInfo->rsslConnectOptions.userSpecPtr = &chanCommands[i];
                pInfo->initializationTimeout = 30;
                pOpts->reactorConnectionList = pInfo;
                pOpts->connectionCount = 1;
                pOpts->reconnectAttemptLimit = -1;
                pOpts->reconnectMaxDelay = 5000;
                pOpts->reconnectMinDelay = 1000;

                pInfo->rsslConnectOptions.userSpecPtr = pCommand;
                pInfo->rsslConnectOptions.connectionInfo.unified.address     = pCommand->hostName;
                pInfo->rsslConnectOptions.connectionInfo.unified.serviceName = pCommand->port;
                pInfo->rsslConnectOptions.compressionType = RSSL_COMP_NONE;
                pInfo->rsslConnectOptions.encryptionOpts.encryptionProtocolFlags = RSSL_ENC_TLSV1_2;
                pInfo->rsslConnectOptions.connectionType   = RSSL_CONN_TYPE_ENCRYPTED;
        }

I am not quite sure that you can encode multiple messages into a buffer when using tunnel stream. To encode multiple messages into a buffer, the application needs to get a packed buffer from the transport layer. However, from my checking, the application may not be able to get a packed buffer from the tunnel stream.

RSSL_VA_API RsslBuffer *rsslTunnelStreamGetBuffer(RsslTunnelStream *pTunnel,
        RsslTunnelStreamGetBufferOptions *pRsslTunnelStreamGetBufferOptions, RsslErrorInfo *pError);
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.