question

Upvotes
Accepted
5 1 2 3

How to interpret HK broker feed

I'm trying to use the HK broker feed for 2318bk.HKd

I use the fields 317-326 to get the broker IDs and the first message I receive is perfectly as expected:

FIELD_ENTRY 317/ROW80_3: [RMTES_STRING] 8127 -1s 2311 7609 | 5347 3439 1499 3439
FIELD_ENTRY 318/ROW80_4: [RMTES_STRING] 2087 8134 6655 3443 | 4057 4086 4083 8914
FIELD_ENTRY 319/ROW80_5: [RMTES_STRING] 7387 2310 4628 8188 | 8734 1196 +2s 2045
FIELD_ENTRY 320/ROW80_6: [RMTES_STRING] 4978 5838 7387 2077 | 4083 3676 5589 3439
FIELD_ENTRY 321/ROW80_7: [RMTES_STRING] 8574 3177 1799 4057 | 1196 3676 4638 9053
FIELD_ENTRY 322/ROW80_8: [RMTES_STRING] 2077 6722 4978 5338 | 5589 8734 0318 4057
FIELD_ENTRY 323/ROW80_9: [RMTES_STRING] 2045 6098 8169 4057 | +1s 3443 8939 +3s
FIELD_ENTRY 324/ROW80_10: [RMTES_STRING] 4057 8575 0535 -2s | 7387 5838 1799 5589
FIELD_ENTRY 325/ROW80_11: [RMTES_STRING] 4057 1799 8169 9053 | 5524 1755 3443 1196
FIELD_ENTRY 326/ROW80_12: [RMTES_STRING] 4083 8730 1799 5357 | 5589 4057 3443 6698

But then I receive an update that looks like:

FIELD_ENTRY 323/ROW80_9: hpos: 19, 8840
FIELD_ENTRY 324/ROW80_10: hpos: 20, 593
FIELD_ENTRY 325/ROW80_11: hpos: 19, 9028
FIELD_ENTRY 326/ROW80_12: hpos: 19, 7387

I'm not sure how to interpret the second message and I can't find any documentation for this.

Can someone please point me to some documentation or help me to intrepret this message?

refinitiv-realtimetreprfarfa-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.

Upvote
Accepted
9.6k 10 7 7

Hello @martin.bjorling

RFA Java provides the following methods in OMMDataBuffer interface that help to interpret partial update:

  • hasPartialUpdates() Returns true if the buffer contains partial update sequences. This is only applcable to RMTES.
  • horizontalPosition() Returns an offset of this partial sequence. This is only applicable to RMTES.
  • partialUpdateIterator() Returns Iterator of OMMDataBuffer of partial field substrings. This is only applicable to RMTES.

The example application to interpret partial update is Viewer located in <RFA Java Package>\Examples\com\reuters\rfa\example\omm\gui\viewer. setFirstField(..) in class FieldListValues demonstrates how to interpret partial update as shown below:

OMMData data = fentry.getData(fiddef.getOMMType());
if (data.getType() == OMMTypes.RMTES_STRING)
{
   OMMDataBuffer db = (OMMDataBuffer)data;
   if (db.hasPartialUpdates())
   {
      Iterator<?> iter = ((OMMDataBuffer)data).partialUpdateIterator();
      StringBuilder newValue = new StringBuilder(fiddef.getMaxOMMLengthAsInt());
      newValue.append(field.getValue().toString());
      while (iter.hasNext())
      {
         OMMDataBuffer partial = (OMMDataBuffer)iter.next();
         String partialString = partial.toString();
         int hpos = partial.horizontalPosition();
         int end = hpos + partialString.length();
         newValue.replace(hpos, end, partialString);
       }
      field.setValue(newValue.toString(), fentry.getData().getEncodedLength(), fentry.getData().isBlank());
   }
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
1.5k 5 6 7

What you see is called partial field updates.

It is a special feature which is sometimes used on longer fields of type RMTES_STRING. Rather then updating all of the say 80 chars, only a fraction of them are updated. This is a bit more efficient and has the benefit that a visual display can give some kind of indication to a human exactly which parts of the string has updated.

Just search the documentation for "partial" and you'll see what I mean. There's support for it in the API.

So for example:

hpos=19, "July"

means that starting from position 19 in the string, then "July" should replace whatever is currently at those positions in the string.

A single partial update may contain multiple single updates.

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.

For RFA C++, you can find the sample code in the developer guide or this question.

The application needs to maintain the full data buffer for each field and then use RMTESConverter and PartialUpdateReadIterator to apply the partial update to the full data buffer.

Upvotes
75 1 2 7

Thank you very much for your info. I'll try it out.

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
75 1 2 7

Hi, great I can now catch the pos and update. :-)
But. I have now the problem that I can't encode the ItemName of the 2nd,... updates?

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

This is a new problem which is not related to the question in this post so please post the problem as a new question. This will make everyone see your new problem obviously to be able to help you. In addition, someone who has the same problem as you can find it.

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.