当我尝试连接 solace VMR 服务器并从名为 Vertx AMQP Bridge 的 Java 客户端传递消息时。
我能够连接 Solace VMR 服务器,但连接后无法向 Solace VMR 发送消息。我正在使用来自 vertx 客户端的以下发件人代码。
public class Sender extends AbstractVerticle {
private int count = 1;
// Convenience method so you can run it in your IDE
public static void main(String[] args) {
Runner.runExample(Sender.class);
}
@Override
public void start() throws Exception {
AmqpBridge bridge = AmqpBridge.create(vertx);
// Start the bridge, then use the event loop thread to process things thereafter.
bridge.start("13.229.207.85", 21196,"UserName" ,"Password", res -> {
if(!res.succeeded()) {
System.out.println("Bridge startup failed: " + res.cause());
return;
}
// Set up a producer using the bridge, send a message with it.
MessageProducer<JsonObject> producer =
bridge.createProducer("T/GettingStarted/pubsub");
// Schedule sending of a message every second
System.out.println("Producer created, scheduling sends.");
vertx.setPeriodic(1000, v -> {
JsonObject amqpMsgPayload = new JsonObject();
amqpMsgPayload.put(AmqpConstants.BODY, "myStringContent" + count);
producer.send(amqpMsgPayload);
System.out.println("Sent message: " + count++);
});
});
}
}
我收到以下错误:
网桥启动失败:io.vertx.core.impl.NoStackTraceThrowable: Error{condition=amqp:not-found, description='SMF AD bind response error', info={solace.response_code=503, solace.response_text=Unknown Queue} 2018 年 4 月 27 日下午 3:07:29 io.vertx.proton.impl.ProtonSessionImpl 警告:接收器因错误 io.vertx.core.impl.NoStackTraceThrowable 关闭:错误{condition=amqp:not-found, description='SMF AD 绑定响应错误', info={solace.response_code=503, solace.response_text=Unknown Queue}}
我已经在 solace VMR 中正确创建了队列和主题,但无法发送/接收消息。我是否缺少 solace VMR 服务器端的任何配置?上面的 Vertx Sender Java 代码是否需要任何代码更改?传递消息时,我收到上面的错误跟踪。有人可以帮忙吗?
Vertx AMQP 桥 Java 客户端:https ://vertx.io/docs/vertx-amqp-bridge/java/