3 ms·
I don't quite get it. Why can't I just enforce schema validation in my pub/sub handlers? I see the YAML example completed here: https://www.asyncapi.com/docs/g
by MuffinFlavored 7y ago
I don't quite get it. Why can't I just enforce schema validation in my pub/sub handlers?
I see the YAML example completed here: https://www.asyncapi.com/docs/getting-started/servers/ https://www.asyncapi.com/docs/getting-started/servers/
asyncapi: 2.0.0
info:
title: Hello world application
version: '0.1.0'
servers:
production:
url: broker.mycompany.com
protocol: amqp
description: This is "My Company" broker.
channels:
hello:
publish:
message:
payload:
type: string
pattern: '^hello .+$'
This looks like a thin wrapper around sending a message to a message queue. What's the gain?
Where do you define what to do as a subscriber?
- derberg 7y agoyou have 2 operations in the spec, publish and subscribe. above example already tells you what to do as a subscriber, as the document you shared describes an application that publishes a message