Skip to content

Latest commit

 

History

History
73 lines (57 loc) · 3.1 KB

File metadata and controls

73 lines (57 loc) · 3.1 KB
description
This page contains the technical details of the SSE entrypoint plugin

Server-sent Events

{% hint style="warning" %} This feature requires Gravitee's Enterprise Edition. {% endhint %}

Overview

This Advanced version of the SSE plugin adds enterprise features to the OSS version of the SSE entrypoint. Refer to the following sections for additional details.

Quality of Service

The Advanced version of the SSE plugin offers improved QoS.

QoSDeliveryDescription
NoneUnwarrantedAlready supported by OSS
Balanced0, 1 or nAlready supported by OSS
At-Best0, 1 or nSupport Last-Event-ID to improve QoS
At-Most-Once0 or 1Support Last-Event-ID to improve QoS
At-Least-Once1 or nSupport Last-Event-ID to improve QoS

Compatibility matrix

Plugin version APIM version
1.x 3.19.x
2.x 3.20.x
3.x 3.21.x

Entrypoint identifier

To use this Advanced version of the plugin, either:

  • Declare the following sse-advanced identifier while configuring your API entrypoints
  • Simply update your existing API, due to the compatibility of the Advanced and OSS configurations

Entrypoint configuration

When creating a new API, configure this plugin with the following parameters:

{
    "name": "apiv4-sse",
    "apiVersion": "1.0",
    "definitionVersion": "4.0.0",
    "type": "async",
    "description": "apiv4 with SSE entrpoint",
    "listeners": [
        {
            "type": "http",
            "paths": [
                {
                    "path": "/test-sse"
                }
            ],
            "entrypoints": [
                {
                    "type": "sse-advanced",
                    "configuration": {
                        "metadataAsComment": false, # Allow sending messages metadata to client as SSE comments. Each metadata will be sent as an extra line following ':key=value' format
                        "headersAsComment": false # Allow sending messages headers to client as SSE comments. Each header will be sent as an extra line following ':key=value' format
                    }
                }
            ]
        }
    ],
    ...
}