mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
Put workspace to message headers (#9428)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user