Last active
January 25, 2023 07:56
-
-
Save merlin-quix/ee2015173fd320f521c914658d5785cf to your computer and use it in GitHub Desktop.
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
for message in consumer: | |
mv = message.value | |
# Load the decoded value as JSON | |
mjson = json.loads(mv) | |
# Print the message key and a selection of data points from the JSON | |
print(f"KEY: {message.key} | " | |
f"VALUE: {datetime.utcfromtimestamp(mjson['time']/1e3)}, | |
{mjson['host']},{mjson['address']} ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment