@lucaapp/service-utils 1.14.1 → 1.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,7 +156,7 @@ class KafkaClient {
156
156
  };
157
157
  this.consume = async (kafkaTopic, handler, fromBeginning = false) => {
158
158
  const topic = await this.getTopic(kafkaTopic);
159
- const groupId = `${this.environment.valueOf()}_${this.serviceIdentity.identityName}`;
159
+ const groupId = `${this.environment.valueOf()}_${kafkaTopic.valueOf()}_${this.serviceIdentity.identityName}`;
160
160
  try {
161
161
  const consumer = this.kafkaClient.consumer({ groupId });
162
162
  this.consumers.push(consumer);
@@ -172,7 +172,11 @@ class KafkaClient {
172
172
  const decryptedValue = await this.decryptValue(kafkaTopic, message.value);
173
173
  await this.verifySignature(kafkaTopic, decryptedValue, message.headers);
174
174
  const value = this.parseValue(decryptedValue);
175
- this.logger.debug({ key: message.key, value, timestamp: message.timestamp }, 'Record received');
175
+ this.logger.debug({
176
+ key: message.key?.toString(),
177
+ value,
178
+ timestamp: message.timestamp,
179
+ }, 'Record received');
176
180
  await handler({ ...message, value });
177
181
  messageAcknowledgedCounter
178
182
  .labels({ topic: kafkaTopic.valueOf(), groupId })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaapp/service-utils",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [