Get namespace for a channel programmatically

Hi All,

I have multi channel setup and have different namespace for each channel.
ex: channel1 - namespace1
channel2 - namespace2

Is there a way to retrieve list of namespaces being used in a particular channel programmatically? I am on version 12.4.

Thanks
Rahul

Why not add them to the mount node and read them from there?