We have an Azuer EventHub which receives messages from different sources.
For some unavoidable reasons, we receive invalid JSON payload from time to time which causes deserialisation fail in subscribers of EventHub.
Is there a way we can add restrictions to the EventHub to receive only valid JSON payloads and reject the invalid ones? So that the publishers get to know that message was rejected and they need to fix them?
I know we can treat the payload as a plain string
and try to parse them in our subscribers but then we need to inform the sources about it and I see this as the last option.