My current project in c# requires getting the number of under replicated partitions from a kafka server. I can view this in jconsole under the mbeans section, but I need to get the value in a c# program. I tried using NetMX with this code to make the initial connection.
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
INetMXConnector connector = NetMXConnectorFactory.Connect(new Uri("http://<myserver>:<jmxport>"), null);
IMBeanServerConnection remoteServer = connector.MBeanServerConnection;
A "Section not found" error is thrown at the second line and I was wondering if anyone could help with this please?