Skip to content

Feedback on managing subscriptions via api #1342

Open

Description

@thompson-tomo

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.

Activity

  1. changed the title [-]Feedback on subscription api.[/-] [+]Feedback on managing subscriptions[/+] on May 10, 2025
  2. changed the title [-]Feedback on managing subscriptions[/-] [+]Feedback on managing subscriptions via api[/+] on May 10, 2025
  3. duglin commented on May 14, 2025

    @duglin
    Collaborator
  4. clemensv commented on May 20, 2025

    @clemensv
    Contributor

    The subscription API is intentionally quite loose in how it defines event sinks.

    Adding a deliverymode switch is a good idea. We've had quite a few discussions about protocol/envelope configurations in xRegistry and should bring those here, including moving the target endpoint into the protocol-specific section.

  5. thompson-tomo commented on May 21, 2025

    @thompson-tomo
    ContributorAuthor

    Ok, I really am not a fan of

    moving the target endpoint into the protocol-specific section.

    As That seems to be contradictory to the interoperability achieved with cloud events messages hence my proposal for being able to specify the path in an agnostic way via #1346.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions