This message was deleted.
# general
s
This message was deleted.
n
you must declare the json schema in the
vs
parameter.
Copy code
bin/pulsar-client produce \
    -m "{\"id\":\"hello\"}" \
    -vs "json:{\"type\": \"record\",\"namespace\": \"com.example\",\"name\": \"myschema\", \"fields\": [{ \"name\": \"id\", \"type\": \"string\" }]}" \
    mytopic
h
Are you passing two json objects?
one after -m flag and one after -vs flag
what's the difference between those two?
n
-vs is the value schema
-vs, --value-schema
Schema type (can be bytes,avro,json,string...)
Default: bytes
h
i mean which is the message that is being passed?
is the one after -vs flag the message or after the m flag?
n
the -m is the message with the content. “vs” explains the schema for the messages if you subscribe to the topic, you will get {“id”: “hello”}
🙌 1
h
thanks