What is a protocol?
A protocol is a set of rules that specifies how information is exchanged between applications and/or servers.
Why do we need protocols?
Whenever a producer detects a state change (events) and publishes those events as messages, a protocol carries those messages to the channel and then to a consumer. Protocol plays a vital role in message transmission.
The diagram above depicts the message exchange flow from
consumer using the MQTT protocol with QoS0 (quality of service 0). This means that information exchanged from
consumer is delivered at most once.
The quality of service information rule is specified on a protocol level. Broker implementations and other involved actors must act accordingly.
In AsyncAPI documents, all protocol-specific details that the application follows can be described using bindings.