We are migrating from RFA 7.6 to 8.1. We recently found a scenario in which Payload from OmmMsg was null, causing NullPointerException. Below is the snippet that caused the issue. From which we already verify that event and msg are not null.
byte data = ommItemEvent.getMsg().getPayload().getBytes()
Also this scenario was never previously observed where payload can be null.
So I want to know that in which scenario we can get null payload like any event, connection issue (which I don't see on logs), or any issue on Reuters side.
You can receive message with no payload - e.g. a StatusMsg would have no payload.
Are you trying to extract a Payload from a StatusMsg?
As demonstrated in many of the RFA examples you should always check if a payload is blank before attempting to access the data e.g.
if ( respMsg.getPayload().isBlank() )