@itentialopensource/adapter-kafkav2 0.6.10 → 0.7.0

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 0.7.0 [05-19-2023]
3
+
4
+ * Add topic name to message
5
+
6
+ See merge request itentialopensource/adapters/notification-messaging/adapter-kafkav2!6
7
+
8
+ ---
9
+
2
10
  ## 0.6.10 [05-19-2023]
3
11
 
4
12
  * Bug fixes and performance improvements
package/adapter.js CHANGED
@@ -507,7 +507,6 @@ class Kafkav2 extends AdapterBaseCl {
507
507
  eachMessage: async ({ topic, partition, message }) => {
508
508
  log.info(`PROCESSING NEW MESSAGE ON TOPIC: ${topic} PARTITION: ${partition} WITH OFFSET: ${message.offset}`);
509
509
  const newMsg = message;
510
- newMsg.topic = topic;
511
510
  let avroUsed = false;
512
511
  let desiredTopic = [];
513
512
  let allowedPartition = false;
@@ -588,10 +587,12 @@ class Kafkav2 extends AdapterBaseCl {
588
587
  messageObj = { [wrapper]: newMsg.value.toString() };
589
588
  }
590
589
  for (let j = 0; j < desiredTopic.length; j += 1) {
590
+ messageObj.topic = topic;
591
591
  eventSystem.publish(desiredTopic[j], messageObj);
592
592
  }
593
593
  } else {
594
594
  for (let j = 0; j < desiredTopic.length; j += 1) {
595
+ newMsg.topic = topic;
595
596
  eventSystem.publish(desiredTopic[j], newMsg);
596
597
  }
597
598
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-kafkav2",
3
- "version": "0.6.10",
3
+ "version": "0.7.0",
4
4
  "description": "Itential adapter to connect to kafka",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.35.0",
Binary file