Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support sse protocol #252

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This repository contains the specifications for each AsyncAPI protocol binding.
* [NATS binding](./nats)
* [Pulsar](./pulsar)
* [Redis binding](./redis)
* [Server-Sent Events binding](./sse)
* [SNS binding](./sns)
* [Solace binding](./solace)
* [SQS binding](./sqs)
Expand Down
53 changes: 53 additions & 0 deletions sse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Server Sent Events Bindings

This document defines how to describe Server Sent Events-specific information on AsyncAPI.

See the [Server-Sent Events protocol specification][protocolSpecification].

Server-Sent Events requires `http` protocol, so the SSE [Message Binding Object](#message) below is appropriate for AsyncAPI Servers with protocol `http` or `https`.

<a name="version"></a>

## Version

Current version is `0.1.0`.


<a name="server"></a>

## Server Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.


<a name="channel"></a>

## Channel Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.


<a name="operation"></a>

## Operation Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.


<a name="message"></a>

## Message Binding Object

This object contains information about the message representation in SSE.

##### Fixed Fields

Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectEventType"></a>`event` | string | Server-sent event type, typically `message`, to specify allowed SSE message types. |
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.


[protocolSpecification]: https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events
Loading