-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Version of Kpow
factorhouse/kpow-ce:93.3
Describe the bug
When consuming(topic inspection) Protobuf encoded messages with boolean fields the outputted JSON values are missing those fields when their values are false while including them when their values are true.
To Reproduce
Steps to reproduce the behavior:
- Go to "Topics" and select a topic containing "Protobuf" encoded messages
- Chose "Inspect" from the corresponding context menu
- In the "Inspect" tab select the following options:
a. Mode: Sample
b. Window: Recent
c. Key deserializer: None
d. Value deserializer: Protobuf
e. Headers deserializer: None
f. Schema Registry: "the-schema-registry-name". We AWS Glue as a schema registry and the corresponding schema definitions are successfully retrieved from there. - Click "Search"
Expected behavior
Expected to always see boolean fields being displayed when consuming such messages, irrespective of their values, but fields with false values are omitted from the output. We know with certainty that boolean fields with false values exist on many of our messages and just not displayed by "kpow" for some reason.
Screenshots
Message output displaying the occupied boolean field when its value is true
topic: our-topic
partition: 1
offset: 1561769
timestamp: 1722962144562
age: 02s
value:
{
"id": "06158910-e8ad-4270-afed-0bc2d3d3b673",
"timestamp": "2024-08-06T16:35:44.562269840Z",
"sourceEvent": {
"id": "cbc7a570-4c8f-45b2-9aaa-8c174eb68737",
"timestamp": "2024-08-06T16:35:44.222634Z",
"sourceId": "1774cd10-777b-4146-b65f-72e3cd2f1431",
"updateTime": "2024-08-06T16:35:42.792Z",
"parkingAreaId": 3,
"parkingSpaceId": "3E321M",
"parkingSpaceName": "E321 Space M",
"occupied": true
},
"authRealm": "someRealm",
"authClientId": "someClient"
}
Message output omitting the occupied boolean field when its value is false
topic: our-topic
partition: 1
offset: 1561770
timestamp: 1722962144562
age: 02s
value:
{
"id": "1034ccd1-17e9-490f-bb14-bcaa11c9456a",
"timestamp": "2024-08-06T16:35:44.562404773Z",
"sourceEvent": {
"id": "51839ddc-39d5-4801-9969-4c5833af1c27",
"timestamp": "2024-08-06T16:35:44.222644Z",
"sourceId": "3601b01e-4af8-44eb-aa30-f978e77bbb9c",
"updateTime": "2024-08-06T16:35:42.792Z",
"parkingAreaId": 3,
"parkingSpaceId": "3E321F",
"parkingSpaceName": "E321 Space F"
},
"authRealm": "someRealm",
"authClientId": "someClient"
}
Protobuf schema subject retrieved from schema registry
syntax = "proto3";
option java_package = "our.package.message";
import "google/protobuf/timestamp.proto";
message Status {
string id = 1;
google.protobuf.Timestamp timestamp = 2;
SourceEvent sourceEvent = 3;
string auth_realm = 4;
string auth_client_id = 5;
}
message SourceEvent {
string id = 1;
google.protobuf.Timestamp timestamp = 2;
string source_id = 3;
google.protobuf.Timestamp update_time = 4;
uint32 parking_area_id = 5;
string parking_space_id = 6;
string parking_space_name = 7;
bool occupied = 8;
}
Environment:
- OS: MacOS
- Browse: Chrome, Firefox, Safari
- Docker Desktop: 4.27.2 (137060)
- Java 17