confluentinc / confluentinc/vscode
Add CodeLens option to Dataset files for creating Medusa Server-Sent Events Streams
- Dominant language
- TypeScript
- Stars
- 34
- Forks
- 17
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
_Note_: A Dataset may include multiple Events, each optionally mapped to a specific topic. Events can share a topic, use separate ones, or be left unmapped. A Medusa SSE stream therefore can contain SSE events from multiple Medusa 'Events'.
Below flow shows the process of creating a stream from a *.dataset.json.
On click of the Produce Stream option is when the stream will be created. For this the Medusa build stream endpoints can be used:
`POST /v1/streams/{streamId}`
`POST /v1/streams`
These endpoints take the Dataset content as the POST body. And each will return a StreamDetails response:
```
{
"stream_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tag": "string",
"started": true,
"subscriptions": 0
}
```
These endpoints accept an optional 'tag' query parameter, this should be sent to improve the UX so the user can easily identify any running streams as opposed to displaying the Stream IDs in the UI. The Dataset file name could be a good option for this.
_Note_: This ticket does not include the subscription to these SSE streams or production to Kafka, it is focused only on Stream creation.
Contributor guide
Assessment
This issue has not been assessed yet.