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 ");
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();