provectus / kafka-ui

Open-Source Web UI for Apache Kafka Management
Apache License 2.0
8.97k stars 1.1k forks source link

[bug]topic messages show incorrect string value #4461

Closed hashkey-ops-admin closed 1 week ago

hashkey-ops-admin commented 2 weeks ago

Issue submitter TODO list

Describe the bug (actual behavior)

The topic messages show incorrect string value as we use fastjson to serialize the topic message like this:

RecordMetadata recordMetadata = producer.send(<TOPIC_NAME>, JSON.toJSONString(message)).get();

We expected to see topic message like this:

{
      "userId":1712238412889623552,
      "totalStatus":2,
      "time":1718850732154,
      "msgId":"b00976ea-ab16-4ac5-8e23-4f8a4194b5c4"
}

However, we got message like this on kafka-ui:

{
    "msgId": "b00976ea-ab16-4ac5-8e23-4f8a4194b5c4",
    "time": 1718850732154,
    "totalStatus": 2,
    "userId": 1712238412889623600
}

As you can see, the userId is different. Can u help check why this happened? Looks like it's due to something wrong happens during the deserialization of Long type to string(the userId is in Long type).

Expected behavior

No response

Your installation details

We deployed kafka-ui with docker image, this image is:

provectuslabs/kafka-ui latest cf4ebffbd785 11 months ago 260MB

Current time is 2024/06/20 UTC, we didn't see any bug fix in this year(2024).

Steps to reproduce

You could produce topic message like what I described in the detail part and check it on kafka-ui, then you should get the different userId.

Screenshots

No response

Logs

No response

Additional context

No response

github-actions[bot] commented 2 weeks ago

Hello there hashkey-ops-admin! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

Haarolean commented 2 weeks ago

Hi, PTAL at #4255 And I believe we fixed this here: https://github.com/kafbat/kafka-ui

hashkey-ops-admin commented 1 week ago

@Haarolean Appreciate for ur quick answer. I've tried the latest image from ghcr.io/kafbat/kafka-ui:latest and it works.