forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pulsar Client: allow to print GenericRecord contents (apache#9785)
### Motivation When you are dealing with structured data it would be pretty useful to have a tool that prints decoded records directly to the console. ### Modifications Add two new options to the "pulsar-client consume" tool: - "--schema-type" option, that can be "bytes" and "auto_consume" in order to select the Schema (in particular you are interested in AUTO_CONSUME if you are dealing with GenericRecords) - "--hide-content" boolean option, that shuts down the printing of the contents of the messages, in case they are in binary form or that you are using the tool only to test if any message is coming from the topic In case of GenericRecords we are printing the content of the record like a Java Map. We are also handling nested GenericRecord structures as well.
- Loading branch information
Showing
2 changed files
with
65 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters