Get default Broker Name and Server Name

Hello All,

I need to get the default Broker Server Name, Broker Name and Broker Port No to which IS is currently connected. Are there any predefined services or need to code a new Java service?

Please guide.

Thanks,
Sateesh

Sateesh,

You can use the wm.broker.admin.servers:getServerList
service in the WmBrokerAdmin package to get a list of BrokerServers.

You can invoke the wm.broker.admin.servers:getBrokerList and wm.broker.admin.servers:getDefaultBroker services with an input parameter of serverName to get a list of brokers on a broker server and to get the name of the default broker respectively.

HTH,

Mark

Hello Mark,

Thanks for your prompt reply. wm.broker.admin.servers:getServerList works fine.

But the other two (namely wm.broker.admin.servers:getBrokerList and wm.broker.admin.servers:getDefaultBroker ) doesnt provide any input parameters (you specified to give serverName as input). FYI- I am working on 6.1.5 version of webMethods.

Appreciate your help.

Sateesh

Just add a new string variable to the input pipeline of that service. You can either use set value to something like “localhost:6849” or map a value from serverName value in the document list returned by the wm.broker.admin.servers:getServerList call.

Mark
wm.broker.admin.servers_getBrokerList.JPG

Thanks Mark. This helped.

I have a question. When I browsed thru the other services in the same package, none of them have input/output parameters. In general how does one know what parameter a particular service needs?. Is there any documentation provided anywhere?

Sateesh

Sateesh:

These are internal services that are not intended for use by end users such as us and thus are not documented. Sometimes we use them anyway but if you run into trouble, wM support won’t help you. And future versions may change these services, which may break your solution. Use these types of services only if you have to.

Hi Reamon,

Ok. This is interesting. But is there any other way to know the default broker name and broker server name to which it is connected?

Appreciate your help,

Sateesh

Sateesh,

What are you attempting to do with this information?

Mark

There is one old interface which uses pub.publish:publishAndWait service. The response flow service is using pub.publish:deliver service with destID parameter = “<ISIpAddress_ISPortNo_RequestReplyClient>” to send response back to waiting service. To know the full name of the RequestReplyClient on the Broker there is a custom java service which gets this clientid by quering alll the clientids on Default Broker and Broker Server. We recently upgraded from 6.1 to 6.1.5. Now the Broker Name has port Number in 6.1.5 version. Hence I am asking for the Default broker.

Hope you understood.

Is this the only way the pub&wait is done or is there any better way.

Thanks
Sateesh

The responding service should use pub.publish:reply instead of deliver. It handles all the details of setting up the reply document envelope to be delivered to the waiting requestor. Review chapter 6 in the “Publish-Subscribe Developer’s Guide” for more info.