question

Upvotes
Accepted
21 2 6 10

Is it possible to make a copy of encoded buffer and just change the stream ids before writing to UPA?

elektronelektron-sdkrrteta-apielektron-transport-api
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 @Kam.Anjorin,

In order for the community to discuss, could you please describe what the application is doing, is it a consumer, publisher, poster, what the buffer is used for.

Please include any details pertaining to your question.

Thanks,

-AHS

The question is more likely to be UPA/ETA functionality question so that I moved it to ETA section.

@Kam.Anjorin, considering your query, we moved it from the Elektron to the UPA forum, it seems more appropriate, and will help people discover it. AHS

Asked expert Brian Sandri.

Hello @Kam.Anjorin,

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

Show more comments
Upvote
Accepted
32.2k 40 11 20

Hello @Kam.Anjorin,

RsslBuffer itself is a storage buffer, has a data (contents) and a length. As such, you can create another buffer, allocate storage, and copy, from the first buffer, the data and the length. Then you would modify the content of the first RsslBuffer prior to posting it. Yes, it is feasible to do it this way.

However, RsslBuffer is designed as a vehicle, to carry various OMM structures, messages, creating via encode/decode, shown in UPA SDK examples, RsslProvider, RsslEncodeDecodeExample, etc.

I would suggest approaching this way, encoding the new MarketPrice or fieldList or Map, as to me this is a more structured approach, less error prone, and also you may be able to reuse a lot of the existent code from the examples.

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 2 6 10

This is interactive provider that sends mkt data via adh/ads to the clients.

it is based on UPA API running Linux with TR upa8.0.0.L1.linux.rrg.

The question wants to know whether it's possible/permissible to copy one encoded rsslBuffer to and another before doing rsslWrite on the first buffer.

Then, on the copied buffer, update a fieldEntry and then do rsslWrite.

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.