You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to publish messages using Rest Client but however I keep getting Http 404. The tenant and namespace exists.. the following is the curl command.
curl --location --request POST 'http://34.x.x.116:8080/topics/persistent/tenant1/ns1/resttopic'
--header 'Content-Type: application/json'
--data-raw '{
"valueSchema": "{"name":"","schema":"eyJ0eXBlIjoicmVjb3JkIiwibmFtZSI6IlBDIiwibmFtZXNwYWNlIjoib3JnLmFwYWNoZS5wdWxzYXIuYnJva2VyLmFkbWluLlRvcGljc1Rlc3QiLCJmaWVsZHMiOlt7Im5hbWUiOiJicmFuZCIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJncHUiLCJ0eXBlIjpbIm51bGwiLHsidHlwZSI6ImVudW0iLCJuYW1lIjoiR1BVIiwic3ltYm9scyI6WyJBTUQiLCJOVklESUEiXX1dLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJtb2RlbCIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJzZWxsZXIiLCJ0eXBlIjpbIm51bGwiLHsidHlwZSI6InJlY29yZCIsIm5hbWUiOiJTZWxsZXIiLCJmaWVsZHMiOlt7Im5hbWUiOiJzdGF0ZSIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJzdHJlZXQiLCJ0eXBlIjpbIm51bGwiLCJzdHJpbmciXSwiZGVmYXVsdCI6bnVsbH0seyJuYW1lIjoiemlwQ29kZSIsInR5cGUiOiJsb25nIn1dfV0sImRlZmF1bHQiOm51bGx9LHsibmFtZSI6InllYXIiLCJ0eXBlIjoiaW50In1dfQ==","type":"JSON","properties":{"__jsr310ConversionEnabled":"false","__alwaysAllowNull":"true"},"schemaDefinition":"{\"type\":\"record\",\"name\":\"PC\",\"namespace\":\"org.apache.pulsar.broker.admin.TopicsTest\",\"fields\":[{\"name\":\"brand\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"gpu\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"GPU\",\"symbols\":[\"AMD\",\"NVIDIA\"]}],\"default\":null},{\"name\":\"model\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"seller\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Seller\",\"fields\":[{\"name\":\"state\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"street\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"zipCode\",\"type\":\"long\"}]}],\"default\":null},{\"name\":\"year\",\"type\":\"int\"}]}"}",
// Schema data is just the base 64 encoded schemaDefinition.
"producerName": "rest-producer",
"messages": [
{
"key":"my-key",
"payload":"{"brand":"dell","model":"alienware","year":2021,"gpu":"AMD","seller":{"state":"WA","street":"main street","zipCode":98004}}",
"eventTime":1603045262772,
"sequenceId":1
},
{
"key":"my-key",
"payload":"{"brand":"asus","model":"rog","year":2020,"gpu":"NVIDIA","seller":{"state":"CA","street":"back street","zipCode":90232}}",
"eventTime":1603045262772,
"sequenceId":2
}
]
}'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I have been trying to publish messages using Rest Client but however I keep getting Http 404. The tenant and namespace exists.. the following is the curl command.
curl --location --request POST 'http://34.x.x.116:8080/topics/persistent/tenant1/ns1/resttopic'
--header 'Content-Type: application/json'
--data-raw '{
"valueSchema": "{"name":"","schema":"eyJ0eXBlIjoicmVjb3JkIiwibmFtZSI6IlBDIiwibmFtZXNwYWNlIjoib3JnLmFwYWNoZS5wdWxzYXIuYnJva2VyLmFkbWluLlRvcGljc1Rlc3QiLCJmaWVsZHMiOlt7Im5hbWUiOiJicmFuZCIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJncHUiLCJ0eXBlIjpbIm51bGwiLHsidHlwZSI6ImVudW0iLCJuYW1lIjoiR1BVIiwic3ltYm9scyI6WyJBTUQiLCJOVklESUEiXX1dLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJtb2RlbCIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJzZWxsZXIiLCJ0eXBlIjpbIm51bGwiLHsidHlwZSI6InJlY29yZCIsIm5hbWUiOiJTZWxsZXIiLCJmaWVsZHMiOlt7Im5hbWUiOiJzdGF0ZSIsInR5cGUiOlsibnVsbCIsInN0cmluZyJdLCJkZWZhdWx0IjpudWxsfSx7Im5hbWUiOiJzdHJlZXQiLCJ0eXBlIjpbIm51bGwiLCJzdHJpbmciXSwiZGVmYXVsdCI6bnVsbH0seyJuYW1lIjoiemlwQ29kZSIsInR5cGUiOiJsb25nIn1dfV0sImRlZmF1bHQiOm51bGx9LHsibmFtZSI6InllYXIiLCJ0eXBlIjoiaW50In1dfQ==","type":"JSON","properties":{"__jsr310ConversionEnabled":"false","__alwaysAllowNull":"true"},"schemaDefinition":"{\"type\":\"record\",\"name\":\"PC\",\"namespace\":\"org.apache.pulsar.broker.admin.TopicsTest\",\"fields\":[{\"name\":\"brand\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"gpu\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"GPU\",\"symbols\":[\"AMD\",\"NVIDIA\"]}],\"default\":null},{\"name\":\"model\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"seller\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Seller\",\"fields\":[{\"name\":\"state\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"street\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"zipCode\",\"type\":\"long\"}]}],\"default\":null},{\"name\":\"year\",\"type\":\"int\"}]}"}",
// Schema data is just the base 64 encoded schemaDefinition.
"producerName": "rest-producer",
"messages": [
{
"key":"my-key",
"payload":"{"brand":"dell","model":"alienware","year":2021,"gpu":"AMD","seller":{"state":"WA","street":"main street","zipCode":98004}}",
"eventTime":1603045262772,
"sequenceId":1
},
{
"key":"my-key",
"payload":"{"brand":"asus","model":"rog","year":2020,"gpu":"NVIDIA","seller":{"state":"CA","street":"back street","zipCode":90232}}",
"eventTime":1603045262772,
"sequenceId":2
}
]
}'
thanks in advance
All reactions