Skip to content

spec!: add support for several topic matcher types, including URL Pattern#959

Open
dunglas wants to merge 13 commits intomainfrom
spec/topic-selectors
Open

spec!: add support for several topic matcher types, including URL Pattern#959
dunglas wants to merge 13 commits intomainfrom
spec/topic-selectors

Conversation

@dunglas
Copy link
Copy Markdown
Owner

@dunglas dunglas commented Oct 14, 2024

Replaces #831 with a more flexible and future-proof approach.

Summary

  • In addition to URI templates, regular expressions, URL patterns and CEL expressions are now supported
  • the topic query parameter becomes match and now only supports exact matching
  • new query parameters match{MatchType} are introduced
    • by default, matchRegexp, matchURLPattern, matchCEL, and matchURITemplate are defined
    • hub can implement custom matcher types
    • future updates may introduce new matcher types
  • it's now possible to include per-topic (or topic matcher) payloads (replaces feat: payload for a specific topic #945)
  • the JWT format has been updated to match these new capabilities
  • the subscription API format has been updated to match these new capabilities

The official hub will be able to support both the current and new protocols simultaneously (no hard BC break).

TODO:

  • update all examples

@stale
Copy link
Copy Markdown

stale bot commented Feb 25, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Feb 25, 2025
@soyuka
Copy link
Copy Markdown
Contributor

soyuka commented Mar 6, 2025

This is still ongoing work

@stale stale bot removed the wontfix This will not be worked on label Mar 6, 2025
@stale
Copy link
Copy Markdown

stale bot commented May 6, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label May 6, 2025
@stale stale bot removed the wontfix This will not be worked on label May 13, 2025
@stale
Copy link
Copy Markdown

stale bot commented Jul 18, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 18, 2025
@stale stale bot closed this Jul 29, 2025
@dunglas dunglas reopened this Sep 23, 2025
@stale stale bot removed the wontfix This will not be worked on label Sep 23, 2025
dunglas and others added 10 commits April 2, 2026 16:48
Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 2, 2026 14:49
@dunglas dunglas force-pushed the spec/topic-selectors branch from 1f2bab5 to 13de6ad Compare April 2, 2026 14:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Mercure protocol specification to support multiple topic matcher types (Exact, Regexp, URLPattern, CEL, optional URI Template), introduces match* subscription query parameters, and extends the JWT/subscription formats to support per-matcher payloads.

Changes:

  • Reworks subscription semantics around match + match{Type} query parameters with case-insensitive parameter names and 501 handling for unsupported matcher types.
  • Defines matcher types (Exact/Regexp/URLPattern/CEL/URITemplate) and updates authorization (JWT) semantics to use typed matcher objects.
  • Updates Active Subscriptions (events + API) and examples to include matcher type + matcher value, plus per-matcher payloads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants