question

Upvotes
Accepted
3 0 1 1

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 512.0 KiB each and 1.0 MiB total.

Hello @david.simonek

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@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 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.