Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron Data Platform /
avatar image
Question by pratik.p.mehta · Oct 15, 2018 at 09:26 AM · rfaemaupaeta apieta consumer

When is a message FINAL

What flags or statuses should we use to identify a final message for a given stream id?

Currently, my application uses

public boolean isFinal() {

Msg msg = decodeMsg();

return msg.isFinalMsg() || msg.msgClass() == MsgClasses.ACK;

}

Is this logic correct or we need to look for other markers in response

The application maintains a map of stream ids to their corresponding messages

Whenever the message is marked as final using isFinal() as shown above, we remove it from the map

However, what is noticed is we still get updates for those stream ids

What is the right approach?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Umer Nalla · Oct 16, 2018 at 05:16 AM

Hi @pratik.p.mehta

As you may have noted in the developer guide, the isFinalMsg() is the mechanism for confirming if a message is the final Msg on that Stream and no further messages should be received.

Therefore, if you are observing instances where you continue to receive further messages on a stream after the isFinalMsg(), then you need to trace all incoming and outgoing messages on the channel when running your app - to a file. This XML trace can then be used to confirm if indeed you are receiving additional messages AFTER the final message. If this is the case, you would need to raise a ticket with our Premium support system and attach the trace file, so that it can be investigated offline.

For an example of how to capture all message to a trace file, I recommend you refer to the Consumer example which traces the message to an XML file when a -x parameter is provided on the command line..

In terms of the AckMsg / CloseMsg comment in the - when you as a Consumer send a CloseMsg to explicitly close a stream, you can optionally specify a flag indicating that you want to receive an AckMsg to confirm if the CloseMsg was accepted - this is not the same as the final Msg you receive on a Stream.

Comment
pratik.p.mehta

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Umer Nalla · Oct 15, 2018 at 11:26 AM

Hi @pratik.p.mehta

Can you please clarify why you are treating an AckMsg as Final?

One possible explanation for what you are observing:

You open a stream for an item in order to perform OnStream posting, you perform an OnStream post using its stream id. After which you can expect to get an AckMsg which does NOT have isFinalMsg() set. Upon receipt of that AckMsg, (based on your above code snippet) if you then remove the corresponding stream id from your Map, the stream will still be open and you could get further updates on that stream.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by pratik.p.mehta · Oct 15, 2018 at 12:13 PM

Hi Umer, we don't post anything into TREP, we only consume

Also, from the documentation, it says for ACK Message: A provider uses AckMsg to inform a consumer of success or failure for a specific PostMsg or CloseMsg. This is the reason why the logic accounts for Ack

Not sure what is the best way to consider a message as closed

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by pratik.p.mehta · Oct 22, 2018 at 04:09 PM

Thank you for the explanation - where can we all such detailed documentation?

Could you share any links?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.
  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Elektron Data Platform
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges