Put workspace to message headers (#9428)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2025-07-01 23:43:39 +07:00
committed by GitHub
parent 24049ac414
commit 2c83ddb004
16 changed files with 102 additions and 70 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export class DummyQueue implements PlatformQueue {
topic: QueueTopic | string,
groupId: string,
onMessage: (
msg: { id: WorkspaceUuid | string, value: T }[],
msg: { workspace: WorkspaceUuid, value: T }[],
queue: {
pause: () => void
heartbeat: () => Promise<void>
+2 -2
View File
@@ -25,7 +25,7 @@ export interface ConsumerHandle {
}
export interface ConsumerMessage<T> {
id: WorkspaceUuid | string
workspace: WorkspaceUuid
value: T[]
}
@@ -68,7 +68,7 @@ export interface PlatformQueue {
* Create a producer for a topic.
*/
export interface PlatformQueueProducer<T> {
send: (id: WorkspaceUuid | string, msgs: T[]) => Promise<void>
send: (workspace: WorkspaceUuid, msgs: T[], partitionKey?: string) => Promise<void>
close: () => Promise<void>
getQueue: () => PlatformQueue