【问题标题】:How to integrate WSO 2 Stream Processor and Tibco EMS?如何集成 WSO 2 流处理器和 Tibco EMS?
【发布时间】:2020-12-02 14:45:56
【问题描述】:

有没有办法让 WSO2 流处理器 Siddhi application 将消息发送到 Tibco EMS 中的 JMS 队列? This guide 这里演示了如何使用 ActiveMQ 来实现,但是如何使用 Tibco EMS 作为接收器进行设置?

我找到了this PR,其中包含有关如何连接到 Tibco EMS 的文档示例。我按照他写的内容进行操作,但在 SP 控制台中出现连接错误:

[2020-12-02 14:24:00,161] ERROR {org.wso2.extension.siddhi.io.jms.sink.JMSSink} - Error while connecting to JMS provider at destination: org.wso2.siddhi.core.util.transport.Option@3ff61cc8
[2020-12-02 14:24:00,164] ERROR {org.wso2.siddhi.core.stream.output.sink.Sink} - Error on 'EMS_EXAMPLE'. Error while connecting to JMS provider at destination: org.wso2.siddhi.core.util.transport.Option@3ff61cc8 Error while connecting at Sink 'jms' at 'TestMonitoring2', will retry in '5 min'. org.wso2.siddhi.core.exception.ConnectionUnavailableException: Error while connecting to JMS provider at destination: org.wso2.siddhi.core.util.transport.Option@3ff61cc8
        at org.wso2.extension.siddhi.io.jms.sink.JMSSink.connect(JMSSink.java:151)
        at org.wso2.siddhi.core.stream.output.sink.Sink.connectWithRetry(Sink.java:217)
        at org.wso2.siddhi.core.stream.output.sink.Sink$1.run(Sink.java:231)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.wso2.transport.jms.exception.JMSConnectorException: Error connecting to JMS provider. Naming exception while obtaining connection factory for FTQueueConnectionFactory
        at org.wso2.transport.jms.sender.JMSClientConnectorImpl.<init>(JMSClientConnectorImpl.java:58)
        at org.wso2.transport.jms.impl.JMSConnectorFactoryImpl.createClientConnector(JMSConnectorFactoryImpl.java:44)
        at org.wso2.extension.siddhi.io.jms.sink.JMSSink.connect(JMSSink.java:148)
        ... 9 more 

我的 siddhi 应用程序如下所示:

@App:name("EMS_EXAMPLE")

@sink(type="jms", destination="sample", connection.factory.jndi.name="FTQueueConnectionFactory", factory.initial="com.tibco.tibjms.naming.TibjmsInitialContextFactory", provider.url="tibjmsnaming://localhost:7222", connection.factory.type="queue", connection.username="tibco", connection.password="tibco",

@map(type = 'json'))
define stream TestMonitoring2 (
    consumerKey string,
     context string,
     api_version string,
     api string,
     resourcePath string,
     resourceTemplate string,
     method string,
     version string,
     userId string,
     tenantDomain string,
     hostName string,
     apiPublisher string,
     applicationName string,
    applicationId string,
    clientIp string,
    applicationOwner string,
    message string,
    type string
);

我的 Tibco EMS 已启动并运行,同时创建了用户和队列:

2020-12-02 14:15:25.191 Process started from '/opt/tibco/ems/8.4/bin/tibemsd'.
2020-12-02 14:15:25.191 Process Id: 3522
2020-12-02 14:15:25.191 Hostname: 9e943d4f4b33
2020-12-02 14:15:25.191 Hostname IP address: 172.17.0.2
2020-12-02 14:15:25.191 Reading configuration from '/opt/tibco/tibco/cfgmgmt/ems/data/tibemsd.conf'.
2020-12-02 14:15:25.194 Logging into file '/opt/tibco/tibco/cfgmgmt/ems/data/datastore/logfile'
2020-12-02 14:15:25.195 Server name: 'EMS-SERVER'.
2020-12-02 14:15:25.195 Storage Location: '/opt/tibco/tibco/cfgmgmt/ems/data/datastore'.
2020-12-02 14:15:25.195 Routing is disabled.
2020-12-02 14:15:25.195 Authorization is enabled.
2020-12-02 14:15:25.195 The server will attempt to trace warnings about destinations that are growing unbounded above 26843545 bytes or 50000 messages.
2020-12-02 14:15:25.195 Set server properties 'large_destination_memory' and 'large_destination_count' respectively to alter these thresholds.
2020-12-02 14:15:25.196 WARNING: Configuration warning: file=/opt/tibco/tibco/cfgmgmt/ems/data/routes.conf, line=51: route 'EMS-SERVER2' does not have a user configured for authorization.
2020-12-02 14:15:25.198 Accepting connections on tcp://9e943d4f4b33/[::]:7222.
2020-12-02 14:15:25.198 Accepting connections on tcp://9e943d4f4b33/0.0.0.0:7222.
2020-12-02 14:15:25.198 Recovering state, please wait.
2020-12-02 14:15:25.200 Recovered 1 message.
2020-12-02 14:15:25.200 Server is active.

我正在使用 WSO2 流处理器 4.4.0、Tibco EMS 8.4,整个东西在 Dockerized CentOS 中运行。

【问题讨论】:

    标签: siddhi tibco-ems wso2sp


    【解决方案1】:

    错误消息“获取 FTQueueConnectionFactory 的连接工厂时出现命名异常”表示目标 EMS 服务器上不存在指定的连接工厂 (FTQueueConnectionFactory)。如果存在,您可能需要检查是否连接到正确的 EMS。

    【讨论】:

      猜你喜欢
      • 2020-07-31
      • 2017-02-11
      • 1970-01-01
      • 1970-01-01
      • 2010-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-03
      相关资源
      最近更新 更多