question

Upvotes
Accepted
53 4 5 7

calling pool.releaseEncoder invalidates msgType in encoded message

Examples in manual e.g. Example 7 sec 6.14.4.4 show calling pool.releaseEncoder(encoder) after the call to getEncodedObject() but this appears to invalidate the msgType in message causing a problem if this is then passed to registerClient.

treprfarfa-apiOMMencoding
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 @alan.bain

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

@alan.bain

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
53 4 5 7

This is what the documentation appears to suggest and would be logical but empirically it is not correct. Once the OMMEncoder is released the msgType in the encoded message becomes 0 (there are other changes too) and the message is not usable. The workaround is to ensure registerClient is called before releasing the encode.

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
21.9k 58 14 21

Hi @alan.bain The returned OMM Message is completely formed after the call to getEncodedObject(), and releasing the encoder will have no effect on it. Do you have access to RFA samples and are able to compile and run them?

See the consumer sample in \com\reuters\rfa\example\omm\cons\LoginClient.java for an example on the use and release of encoder.

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.