add dates to producer/consumer

This commit is contained in:
Emily
2024-12-03 17:40:47 +01:00
parent b630bddef0
commit 9ce2c89575
4 changed files with 71 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ export class RedisStreamService {
}
static async addToStream(streamName: string, data: Record<string, string>) {
const result = await this.client.xAdd(streamName, "*", data);
const result = await this.client.xAdd(streamName, "*", { ...data, timestamp: Date.now().toString() });
return result;
}