On 31/10/2019 22:48, Jerry Peng wrote:
(3) Is there a CLI tool which can be used to examine state?  Or do I have to 
write a pulsar function and send queries to it via a topic?
You can use the pulsar-admin cli to interact with Pulsar function's state e.g.

./bin/pulsar-admin functions querystate

That's excellent, thank you!

$ apache-pulsar-2.4.1/bin/pulsar-admin functions querystate --name womble --key lastmsg
{
  "key": "lastmsg",
  "stringValue": "Hello-9",
  "version": 259
}

$ apache-pulsar-2.4.1/bin/pulsar-admin functions querystate --name womble --key global_count
{
  "key": "global_count",
  "numberValue": 460,
  "version": 229
}

$ apache-pulsar-2.4.1/bin/pulsar-admin functions putstate --name womble -s '{"key":"lastmsg", "stringValue":"blahblah"}'


Reply via email to