question

Upvotes
Accepted
3 0 1 0

migration MarketDataItemCont.setBuffer -> OMM Post

Hi all,

I'm migrating old MarketData based solution to RFA OMM 8.x and I'm curious what is the right way to migrate the MarketDataItemCont.setBuffer call, in which all the fields were encoded in buffer and then contributed.

I tried to do RFA OMM Post with generic buffer payload, but Posting seem to accept FieldList only. So is the right way to contribute payload like following?

// encode the price FID 22
_payloadOMMEncoder.encodeFieldEntryInit((short) 22, OMMTypes.REAL);
_payloadOMMEncoder.encodeReal(10L, OMMNumeric.EXPONENT_NEG4);

// encode the text page line
_payloadOMMEncoder.encodeFieldEntryInit((short) 316, OMMTypes.RMTES_STRING);
_payloadOMMEncoder.encodeRmtesString(" testing text contributions ");

Thank you

David

treprfarfa-apidataposting
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

@david.simonek

The example for posting (com.reuters.rfa.example.omm.postingConsumer) is available in the RFA Java package. The code is in PostIemManager.java and it looks like this:

                _postOMMEncoder.encodeFieldListInit(OMMFieldList.HAS_STANDARD_DATA, (short)0,
                                                    (short)1, (short)0);

                _postOMMEncoder.encodeFieldEntryInit((short)32, OMMTypes.REAL);
                _postOMMEncoder.encodeReal(400, OMMNumeric.EXPONENT_0);

//Add other FieldEntries

                _postOMMEncoder.encodeAggregateComplete();
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea