Skip to content

Commit 281962f

Browse files
Merge pull request #144 from u2d-ai/SAM-543/fix_incorrect_messages_from_kafka
Sam 543/fix incorrect messages from kafka
2 parents ca50b3b + 185ab86 commit 281962f

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

docs/release-notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# msaBase Release Notes
22
## Possible future features:
33

4+
## 0.0.135
5+
6+
- fix logging and create message for Kafka
7+
- update msaDocModels version
8+
49
## 0.0.134
510

611
- Updated sending messages to Kafka

docs/saved_req_package_pip_info.pkl

-17 Bytes
Binary file not shown.

msaBase/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import glob
22
from os.path import basename, dirname, isfile, join
33

4-
version = "0.0.134"
4+
version = "0.0.135"
55
__author__ = "Stefan Welcker"
66
__copyright__ = "Copyright 2022, U2D.ai"
77
__license__ = "MIT"

msaBase/configurate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def create_kafka_endpoint(self) -> None:
216216
Subscribes service to Kafka topic through which new configs will be received.
217217
"""
218218
if not ENABLE_MESSAGE_QUEUE:
219-
self.logger_info(f"Kafka is not enabled. Skipping Kafka consumer creation for topic {SERVICE_TOPIC}.")
219+
self.logger.info(f"Kafka is not enabled. Skipping Kafka consumer creation for topic {SERVICE_TOPIC}.")
220220
else:
221221
threading.Thread(target=self._consume_kafka_messages, daemon=True).start()
222222

@@ -336,7 +336,7 @@ def logger_info(self, message: str, service_name: str, topic_name: str = "") ->
336336
if topic_name and ENABLE_MESSAGE_QUEUE:
337337
try:
338338
producer = self.producer or KafkaUtils.get_producer()
339-
model = MessageInput(service_name=service_name, data=message).json()
339+
model = MessageInput(service_name=service_name, message=message).json()
340340
serialized_value = KafkaUtils.serialize_value(model)
341341
producer.produce(topic_name, serialized_value)
342342
producer.flush(timeout=KAFKA_TIMEOUT)

poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "msaBase"
3-
version = "0.0.134"
3+
version = "0.0.135"
44
description = "General Package for Microservices based on FastAPI like Profiler, Scheduler, Sysinfo, Healtcheck, Error Handling etc."
55
authors = ["Stefan Welcker"]
66
readme = "README.md"
@@ -38,7 +38,7 @@ count = true
3838
[tool.poetry.dependencies]
3939
python = ">=3.9.0,<3.11"
4040
msaFileSystem = "0.0.8"
41-
msaDocModels = "0.0.113"
41+
msaDocModels = "0.0.114"
4242
anyio = "3.7.1"
4343
fastapi = {extras = ["all"], version = "0.86.0"}
4444
fastapi_utils = "0.2.1"

0 commit comments

Comments
 (0)