Describe the bug
Since there's no client available for Node.js, I tried to using WebSocket API for creating producers/consumers. When I tried the example given in the documentation, it throws me the "Unexpected server response: 500" error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should be able produce/consume messages using Websocket clients.
Screenshots

Desktop (please complete the following information):
Additional context
No
@pruthvivrp
in the example, it is using topic my-tenant/my-ns/my-topic1 ( "ws://localhost:8080/ws/v2/producer/persistent/my-tenant/my-ns/my-topic1"). Have you manually created tenant my-tenant and namespace my-ns?
In addition to the create, tenant, namespace has to be able to be used by standalone.
$ bin/pulsar standalone
$ bin/pulsar-admin tenants create my-tenant --allowed-clusters standalone
$ bin/pulsar-admin namespaces create my-tenant/my-ns
$ bin/pulsar-admin namespaces set-clusters my-tenant/my-ns --clusters standalone
or you can update tenant, namespace default value public/default/my-topic1,
then run example.
@sijie Yes you're right, I missed to create the tenants and topics.
@ambition119 It worked with the steps you have mentioned. Please update it in the documentation if possible.
@pruthvivrp cool. glad to hear that it works for you now.
Most helpful comment
In addition to the create, tenant, namespace has to be able to be used by standalone.
or you can update tenant, namespace default value public/default/my-topic1,
then run example.