【问题标题】:How to get queue related details using AndesAdminService class如何使用 AndesAdminService 类获取与队列相关的详细信息
【发布时间】:2016-07-05 09:30:50
【问题描述】:

我在 wso2 消息代理中创建了两个队列 @9​​87654323@ 和 MySecondQueue。我可以使用给定here 的示例应用程序发布和使用消息。

现在使用 wso2 AndesAdminService 类,我想在我的代码中获取队列相关信息,例如创建的队列数、每个队列中的消息数、清除队列等。

我不知道应该如何在我的代码中引入 AndesAdminService 类?还需要什么其他罐子?

我的项目中有以下 jar 文件:

  1. andes-client-3.1.1.jar
  2. geronimo-jms_1.1_spec-1.1.0.wso2v1.jar
  3. log4j-1.2.13.jar
  4. org.wso2.carbon.logging-4.4.1.jar
  5. org.wso2.securevault-1.0.0-wso2v2.jar
  6. slf4j-1.5.10.wso2v1.jar

也请提供示例代码。

我得到了 AndesAdminService 类代码here

【问题讨论】:

  • 请澄清您的具体问题或添加其他详细信息以准确突出您的需求
  • 你好@abarisone 我在我的项目中使用 wso2mb 作为消息代理系统。在 wso2mb 中,我有两个名为“MyFirstQueue”和“MySecondQueue”的队列。我的项目要求是,我必须显示类似 no 的信息。 wso2mb 中的队列数,没有。队列中的消息等等。我知道 AndesAdminService 类提供获取此类信息的 api。我的问题是,我不确定我应该如何在我的项目中使用 AndesAdminService 类。以及使用AndesAdminService需要多少个jar?所以,我想要任何使用 AndesAdminService 类的示例示例,以便我可以参考。

标签: wso2 jms message-queue wso2carbon wso2mb


【解决方案1】:

您可以轻松获取管理服务的 WSDL。 打开 carbon.xml 文件并将 HideAdminServiceWSDL 更改为 false。然后使用 -DosgiConsole 参数启动服务器。在控制台中键入 listAdminServices。在那里,您可以获得可用的管理服务列表及其 WSDL url。 然后使用axis2 或其他一些绑定从WSDL 中创建一个存根。 然后使用生成的存根并调用必要的方法。

【讨论】:

    猜你喜欢
    • 2019-11-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-15
    • 1970-01-01
    • 1970-01-01
    • 2020-07-06
    相关资源
    最近更新 更多