我正在使用 ActiveMQ 5.6.0 和 ActiveMQ NMS 客户端。
我使用以下代码连接到代理:
var connectionFactory = new ConnectionFactory(
"failover:(tcp://localhost:61616)?transport.timeout=5000"
);
connection = connectionFactory.CreateConnection();
connection.Start();
connection.ConnectionResumedListener += OnConnectionResumed;
然后我停止代理并重新启动它。之后在 OnConnectionResumed 方法中
private void OnConnectionResumed()
{
var session = connection.CreateSession();
...
}
尝试创建会话时,我总是遇到故障转移超时异常。
我究竟做错了什么?
谢谢