lensesio / kafka-topics-ui

Web Tool for Kafka Topics |
https://lenses.io
877 stars 148 forks source link

i found message has some different, some only have RAW DATA, but some have TABLE #80

Closed Cloud-Leung closed 6 years ago

Cloud-Leung commented 7 years ago

1

2

just like this,Is that the way I push messages?

i know this should not be a issues, i just really can't understand this , so i hope you can help me .....

Antwnis commented 7 years ago

It depends on how you serialize the data when you write them into a topic.

If the data is structured i.e. either Avro or Json then we do provide the additional (table) + (tree) views.

If the data is un-structured i.e. Binary then you only get to see the (raw) view

Cloud-Leung commented 7 years ago

thank you , i get it.

Cloud-Leung commented 7 years ago

but like up the image ,my data should be structured,it's a json data. I just used StringSerializer when I was pushing data to kafka,Am I using the wrong one? if i used the wrong one ,which one should i use ? qq 20170704154434

these are the kafka Serializer list .

Antwnis commented 7 years ago

Your value seems to be a properly structured JSON message (using StringSerializer) Your key seems to be an Integer and is a 32 bit number that gets translated to 4 bytes - so number 1 is translated to \\0000 \\0000 \\0000 \\0001

Integer is also limited by Integer.MAX - so you could possibly standardise in Json/Json (for both Key and Value). This could make your life easier overall - as otherwise you would need to "remember" what the Key is - and could make your topic harder to be read by non Java apps

@jglambed what do you think about (BYTE i.e. INTEGER) + (JSON) Does it make sense to provide the (table) & (tree) view ?

Cloud-Leung commented 7 years ago

it does work,i set the key to the null ,then the data can be show in the table . i don't care about what the key value, i set the integer value only want to let my datas are evenly in partition . very thank you !