Subscription
Interface: Subscription
Defined in: subscription.ts:118
A subscription manager manages a collection of subscriptions. The upper limit on how many subscriptions are supported is implementation specific.
To help explain the subscription resource, the following non-normative pseudo json shows its basic structure:
Properties
config?
optionalconfig?:object
Defined in: subscription.ts:150
A set of key/value pairs that modify the configuration of of the subscription related to the event generation process. While this specification places no constraints on the data type of the map values. When there is a Discovery Enpoint Service definition defined for the subscription manager, then the key MUST be one of the subscriptionconfig keys specified in the Discovery Endpoint Service definition. The value MUST conform to the data type specified by the value in the subscriptionconfig entry for the key
If present, any "key" used in the map MUST be a non-empty string
Index Signature
[key: string]: string
filters
filters:
Filter[]
Defined in: subscription.ts:188
An array of filter expressions that evaluates to true or false. If any filter expression in the array evaluates to false, the event MUST NOT be sent to the sink. If all the filter expressions in the array evaluates to true, the event MUST be attempted to be delivered. Absence of a filter or empty array implies a value of true.
Each filter dialect MUST have a name that is unique within the scope of the subscription manager. Each dialect will define the semantics and syntax of the filter expression language. See the Filters section for more information.
If a subscription manager does not support filters, or the filter dialect specified in a subscription request, then it MUST generate an error and reject the subscription create or update request.
id
id:
string
Defined in: subscription.ts:119
protocol
protocol:
"HTTP"|"MQTT"|"WEBDA"
Defined in: subscription.ts:159
Identifier of a delivery protocol. Because of WebSocket tunneling options for AMQP, MQTT and other protocols, the URI scheme is not sufficient to identify the protocol. The protocols with existing CloudEvents bindings are identified as AMQP, MQTT3, MQTT5, HTTP, KAFKA, and NATS. An implementation MAY add support for further protocols.
Value comparisons are case sensitive.
protocolsettings?
optionalprotocolsettings?:HttpSettings|MQTTSettings|AMQPSettings|KafkaSettings|NATSSettings
Defined in: subscription.ts:165
A set of settings specific to the selected delivery protocol provider. Options for these settings are listed in the following subsection. An subscription manager MAY offer more options. See the Protocol Settings section for future details.
sink
sink:
string
Defined in: subscription.ts:173
The address to which events MUST be sent. The format of the address MUST be valid for the protocol specified in the protocol property, or one of the protocol's own transport bindings (e.g. AMQP over WebSockets).
Required
source?
optionalsource?:string
Defined in: subscription.ts:128
Indicates the source to which the subscription is related. When present on a subscribe request, all events generated due to this subscription MUST have a CloudEvents source property that matches this value. If this property is not present on a subscribe request then there are no constraints placed on the CloudEvents source property for the events generated.
If present, MUST be a non-empty URI
types?
optionaltypes?:string[]
Defined in: subscription.ts:139
Indicates which types of events the subscriber is interested in receiving. When present on a subscribe request, all events generated due to this subscription MUST have a CloudEvents type property that matches one of these values.
If present, any value present MUST a non-empty string
Examples
com.github.pull_request.opened
com.example.object.deleted