cloudevents / cloudevents/spec

Feedback on managing subscriptions via api

Open
#1,342 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Subscriptions Spec
Dominant language
Python
Stars
5.9k
Forks
613
Avg merge
2d 17h
Merged PRs (30d)
3

Description

I have just taken a look at the subscriptions api in particular the create subscription method and my current impression is that the data model should still undergo more reshaping so that we can end up with something similar to events.

Suggestions is that the request becomes:

Property Type Description Default Required
id string
Path String Where the event should be delivered to No
QueueUndeliverable boolean no
Priority int no
Lifespan int how long before a message should be discarded as it is now stale no
ClientId string who wants the events No
delivery mode string how the message should be delivered: binary,structured, batch etc no
Active boolean should the events be sent true no
AdditionalProperties Array the key & value of the additional properties none no
filters array of filters the filters which should be applied to check if the event is to be sent to the client with the check being done using globs null
filters[0].property enum can be subject, type, source or messageExpression Yes
filters[0].valueType string options like glob, sql etc glob yes
filters[0].value string a value to be used in the filter yes

The client api model should be

Property Type Description Default Required
id string
Destination Uri Where the event should be sent Yes
Path String Where the event should be delivered to No
QueueUndeliverable boolean false no
Priority int 1 no
Lifespan int how long before a message should be discarded as it is now stale no
ClientId string who wants the events No
Active boolean should the events be sent true no
authidentifer string No
authsecret string No
oauthdiscoverydoc Uri if empty auth assumed to be basic auth otherwise oauth No
AdditionalProperties Array the key & value of the additional properties none no

We should have seperate api endpoints to create/manage clients so that they can be reused across subscriptions.

Bindings should be written for the different transports.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing subscriptions create API and the current event model, then compare them with the proposed subscription and client fields. The work is done when the data model, separate client endpoints, filtering behavior, and transport bindings have an agreed specification.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.