question

Upvotes
Accepted
1 0 0 1

Truncated field for a posting consumer

We have a RFA based Java application that pushes data to an ATS service, using off-stream posting (so through a consumer instance using its submit method). We send a set of fields, mostly numerical, inside of a message with a field list payload.

One of these fields is the MARKET_ID (typed as a RMTES_STRING), using the OMMEncoder#encodeRmtesString method. But this fields seems to get truncated to 1 character when reading back what we pushed using eikon, so we're wondering if any extra step must be taken to send string data that way? Note that we have no issue with any of the ,numerical value we send at the same time.

rfa-apiposting
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

Upvotes
Accepted
53k 137 44 63

@gaetan.vaysse

It states in the RFA Java Reference Guide that encodeRmtesString method encodes String as RMTES-compatible RUTF8, which is UTF8 with a 3-byte RMTES introducer. Use this method when the String includes international data. When the data is one-byte ASCII, use encodeString(String, OMMTypes.RMTES_STRING).

1658369001394.png

Therefore, the code should look like this:

                _postOMMEncoder.encodeFieldEntryInit((short)3686, OMMTypes.RMTES_STRING);
                _postOMMEncoder.encodeString("5555", OMMTypes.RMTES_STRING);

Moreover, the length of the MARKET_ID field is four bytes.

MARKET_ID  "MARKET ID"           3686  NULL        ALPHANUMERIC        4  RMTES_STRING     4



1658369001394.png (34.5 KiB)
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.