Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please use one of retry operators as described in Handling errors in reactive streams section of DCAE SDK main page. You should probably use a retry operator with a back-off so you won't be retrying immediately (which can result in DDoS attack on CBS).

There is a StreamParser::unsafeParse method. Why is it unsafe? Should I avoid using it?

Firstly: you SHOULD NOT avoid using it. The name indicates that it's not a pure function. If you are OK with a function throwing exception in case of any problems then you can safely use unsafeParse method (pun intended), given you properly handle StreamParsingExceptions. Otherwise, you should probably use pure parse function which will return either a StreamParsingError or a result by means of vavr Either data type. In other words: you can use any of these methods - it depends on your preferred style.