IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Knowing whether Client Queue/Topic is Connected Or Disconnected

    Posted 04/08/17 02:35 PM

    Hi Guys,

    I want to know if there is any way to know whether the Broker Client Queue/Topic is connected or disconnected through java API. I know we see this in MWS where green indicates it is connected and orange indicates it is disconnected. But i want fetch these status details programatically.

    Thanks,
    vinodkumar.


    #webMethods
    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #broker


  • 2.  RE: Knowing whether Client Queue/Topic is Connected Or Disconnected

    Posted 04/10/17 06:27 AM

    Hi Vinod,

    this can be handled by using JavaAPI of Broker.

    Refer to class COM.activesw.API.client.BrokerClient and methods isConnected().

    Details can be found in the JavaAPI Reference for Broker.

    Regards
    Holger


    #Universal-Messaging-Broker
    #broker
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Knowing whether Client Queue/Topic is Connected Or Disconnected

    Posted 04/10/17 02:10 PM

    Hi Thomsen,

    Thanks for the reply. isConnected() method gives the connection status of the client which we have connected from java service. For instance please have a look at the following piece of code.

    BrokerAdminClient brokerClient = new BrokerAdminClient(“BrokerHost”, “BrokerName”, null, “admin” ,“Broker Stats Monitor”, null );

    Now isConnected() will give the connection status of “admin” client but not connection status of Broker Client Queue/Topic.

    Please correct me if i am wrong any where and thanks for ur reply.

    Thanks & Regards,
    VInodkumar V.


    #Universal-Messaging-Broker
    #broker
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Knowing whether Client Queue/Topic is Connected Or Disconnected

    Posted 04/15/17 02:27 PM

    Hi,

    Can anyone help me on this.

    Thanks & Regards,
    VInodkumar V.


    #webMethods
    #Universal-Messaging-Broker
    #broker
    #Integration-Server-and-ESB


  • 5.  RE: Knowing whether Client Queue/Topic is Connected Or Disconnected

    Posted 04/19/17 03:02 AM

    Here you go:

    // Get admin client object
    BrokerAdminClient brokerClient = new BrokerAdminClient("BrokerHost", "BrokerName", null, "admin" ,"Broker Stats Monitor", null ); 
    
    // Check for connected sessions length. Zero indicates not connected (orange icon on mws) to any client (both java and wm trigger)
    boolean isConnected = (brokerClient.getClientInfoById(queueName).sessions.length == 0 ? false : true);

    #Universal-Messaging-Broker
    #webMethods
    #Integration-Server-and-ESB
    #broker