Siddhi应用程序无法从Wso2 Stream进程接收ampq使用者中的消息

时间:2019-02-22 11:41:07

标签: javascript rabbitmq wso2 siddhi

我正在尝试将siddhi应用程序中的事件发布给Rabbitmq经纪人,以供消费者接收。我正在使用Java脚本,并且运行时环境为node:

receive.js

#!/usr/bin/env node

  var amqp = require('amqplib/callback_api');
    amqp.connect('amqp://localhost', function(err, conn) {
  conn.createChannel(function(err, ch) {
    var q = 'hello';

    ch.assertQueue(q, {durable: false});
    console.log(" [*] Waiting for messages in %s. To exit press CTRL+C", q);
    ch.consume(q, function(msg) {
      console.log(msg);
    }, {noAck: true});
  });
})

seddhi应用程序:

@App:name('TestExecutionPlan') 
define stream FooStream (msg string); 
@info(name = 'query1')
@sink(type ='rabbitmq',
uri = 'amqp://localhost',
exchange.type = 'direct',
exchange.name='amq.direct',
exchange.durable.enabled="false",
queue.name='hello',
routing.key= 'direct',
@map(type='text'))
Define stream BarStream(msg string);
from FooStream select msg insert into BarStream;

当我在WSo2编辑器中模拟事件时,我没有收到任何错误消息,但是在任何地方都看不到该消息的迹象。不在队列或控制台中。有人可以帮忙吗

0 个答案:

没有答案