Skip to content

Commit

Permalink
[improve][pip] PIP-307: Support subscribing multi topics for WebSocket (
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- authored Oct 24, 2023
1 parent 618aede commit c702be1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions pip/pip_307.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Background knowledge

WebSocket currently only supports the consumption of a single topic, which cannot satisfy users' consumption scenarios of multiple topics.

# Motivation

Supports consumption of multiple topics or pattern topics.


# Detailed Design

Currently, the topic name is specified through path for consumption, like:
```
/ws/v2/consumer/persistent/my-property/my-ns/my-topic/my-subscription
```
If we want to support subscribing multi-topics, adding parameters will be confusing. Therefore, add a new v3 request path as follows:

For consumption of pattern-topics:
```
/ws/v3/consumer/subscription?topicsPattern="a.*"
```
For consumption of multi-topics:
```
/ws/v3/consumer/subscription?topics="a,b,c"
```

# Links

* Mailing List discussion thread: https://lists.apache.org/thread/co8396ywny161x91dffzvxlt993mo1ht
* Mailing List voting thread: https://lists.apache.org/thread/lk28o483y351s7m44p018320gq3g4507

0 comments on commit c702be1

Please sign in to comment.