question

Upvotes
Accepted
53 2 5 6

RFAJ gives "Released MSG into wrong OMMPool" error message on the encoder.initialize call

Simple OMM Posting consumer application; first POST works, in preparing the next post the call to encoder.initialize gives this error

com.reuters.rfa.omm.OMMException

: Released MSG into wrong OMMPool

at com.reuters.rfa.internal.rwf.RwfPool.release(Unknown Source)

at com.reuters.rfa.internal.rwf.RwfEncoder.clear(Unknown Source)

at com.reuters.rfa.internal.rwf.RwfEncoder.initialize(Unknown Source)

which I cannot find documented anywhere

treprfarfa-apiOMMposting
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.

Upvote
Accepted
53 2 5 6

Finally tracked this down. I was releasing the POST message to the pool

OMMMsg msg = (OMMMsg) encoder.getEncodedObject();

....

ommpool.releaseMsg(msg);

This then caused an exception the next time I tried to call

encoder.initialize(OMMTypes.MSG, 1000);

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.

Upvotes
23.7k 84 10 22

Hi @alan.bain

Can you recreate this using one of our RFA Java examples e.g. com.reuters.rfa.example.omm.postingConsumer ?

I have a vague recollection of another developer having a similar issue when they had acquired two OMMEncoders and accidentally transposed them in his code in one location.

e.g. the above example has a _payloadOMMEncoder and _postOMMEncoder declared....

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.

Upvotes
53 2 5 6

It's definitely the same encoder & pool being used in both times. I don't have the separate _payload and _post encoders. Turning on IPC tracing I see the first message going out

---DATA TRACE---

MESSAGE

Msg Type: MsgType.POST

Msg Model Type: MARKET_PRICE

Indication Flags: POST_INIT | POST_COMPLETE

Hint Flags: HAS_ATTRIB_INFO | HAS_SEQ_NUM | HAS_PUBLISHER_INFO

SeqNum: 1

Publisher Address: 0xa65fce0

Publisher Id: 18028

AttribInfo

ServiceId: 8032

Name: EURUSDV1M=BBG

NameType: 1 (RIC)

Payload: 44 bytes

FIELD_LIST

FIELD_ENTRY 2: 40

FIELD_ENTRY 4: 02

FIELD_ENTRY 38: 190c07d8

FIELD_ENTRY 22: 40a317999999999a

FIELD_ENTRY 25: 40a3180000000000

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.

Can I get the source code to reproduce this problem in my environment?