...
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 StreamParsingException
s. 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.