2

I am trying with basic Avro publisher in java which is available in examples

https://github.com/confluentinc/examples/blob/5.5.1-post/clients/avro/src/main/java/io/confluent/examples/clients/basicavro/ProducerExample.java

I was successfully able to publish in self managed confluent cloud in my local machine ( macOS ) and in machine available in GCP ( Self managed confluent binaries )

enter image description here

The same was tried it confluent cloud

I have a confluent cloud access, where i am trying with this same example but it is showing junk characters in value.

enter image description here

Steps carried out in confluent cloud

  1. Manually created a topic by name transactions
  2. Configuration file was created with following entries enter image description here
  3. Ran the java application by passing the absolute file path configuration.
  4. I am able to see the schema is also set in confluent cloud. enter image description here

Could any of you help me over here as what is missing.

Robin Moffatt
  • 30,382
  • 3
  • 65
  • 92
Shivakumar ss
  • 653
  • 7
  • 19

1 Answers1

3

Your data is correct; the Confluent Cloud message viewer doesn't currently (September 2020) support rendering Avro messages.

You can verify that your data is correct by using a consumer such as kafkacat:

docker run --rm edenhill/kafkacat:1.6.0 \
         -X security.protocol=SASL_SSL -X sasl.mechanisms=PLAIN \
         -X ssl.ca.location=./etc/ssl/cert.pem -X api.version.request=true \
         -b ${CCLOUD_BROKER_HOST} \
         -X sasl.username="${CCLOUD_API_KEY}" \
         -X sasl.password="${CCLOUD_API_SECRET}" \
         -t your_topic \
         -C -o beginning \
         -f 'Topic %t[%p], offset: %o, Headers: %h, key: %k, payload: %S bytes: %s\n ' \
         -s avro -r https://"${CCLOUD_SCHEMA_REGISTRY_API_KEY}":"${CCLOUD_SCHEMA_REGISTRY_API_SECRET}"@${CCLOUD_SCHEMA_REGISTRY_URL}
 
Robin Moffatt
  • 30,382
  • 3
  • 65
  • 92
  • Thanks a ton @Robin Moffatt. I have validated the consumer the data looks fine. its only the UI having bug. – Shivakumar ss Sep 10 '20 at 13:18
  • Great - if this is the correct answer then please mark it as Answered as it helps others find it in the future. – Robin Moffatt Sep 10 '20 at 16:59
  • 1
    Just did it. pls upvote the question :) for the ppl, I did the same exercise on multiple languages and i thought the issue was language dependent and turned out to be a UI bug. References : https://groups.google.com/g/confluent-platform/c/3pSU1TsNg3A/m/7wNWu27UAAAJ https://github.com/confluentinc/examples/issues/780 https://github.com/riferrei/srclient/issues/15 – Shivakumar ss Sep 10 '20 at 17:34
  • 1
    As of August 2022, it seems the UI is still unable to render AVRO messages. – zavyrylin Aug 24 '22 at 12:24