I'm looking for a way to display all the subjects that currently exist on a NATS Streaming Server during operation. Have thoroughly looked through documentation but have been unable to find a mention of this so far.
Is there a way to find a list of all available subjects that can be subscribed to on the server?
I have just merged a PR that adds Monitoring to the NATS Streaming server. If you start the server with a monitoring port, say -m 8222
, then you can get the list of channels by pointing to http://localhost:8222/streaming/channelsz
This would return:
{
"cluster_id": "test-cluster",
"server_id": "d1dzRa72OpjGRROXKJtfSV",
"now": "2017-06-08T18:14:54.206006151+02:00",
"offset": 0,
"limit": 1024,
"count": 2,
"total": 2,
"names": [
"bar",
"foo"
]
}
For more information, checkout https://github.com/nats-io/nats-streaming-server#monitoring
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With