Validate the messages that arrive on the NATS server #2350
-
Is it possible to validate the messages that arrive on the NATS server using a JSON Schema for example? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Not at the moment, we do hav some plans to facilitate that, at present nothing implemented though. |
Beta Was this translation helpful? Give feedback.
-
Quite interested in this also as it’s become a problem for me in production . If I could Respond immediately with “not valid” to the nats caller it would provide feedback before it went through to consumers. It would also make it easier when configuring and testing a system at design time. i was thinking that json schema would be one option since nats already uses this for its own validation. |
Beta Was this translation helpful? Give feedback.
-
NATS at its core is payload agnostic. We may look into validation of system level services such as JetStream. If your clients need messages in a certain form, that logic (at least some) will always need to be at the application layer, or at least outside of NATS core. |
Beta Was this translation helpful? Give feedback.
NATS at its core is payload agnostic. We may look into validation of system level services such as JetStream.
If your clients need messages in a certain form, that logic (at least some) will always need to be at the application layer, or at least outside of NATS core.