我无法仅从谷歌中弄清楚这一点。我正在连接到一个非持久 EMS 主题,该主题发布一组数据的更新。如果我跳过一些更新,没关系,因为接下来的更新无论如何都会覆盖它。
在 EMS 主题上发布的消息数量非常多,有时无论出于何种原因,消费者都会落后。有没有办法在客户端连接端确定消息的“生存时间”?我知道在其他经纪人上也有,但特别是在 Tibco 上,我一直无法弄清楚这是否可能,只是这个参数绝对可以在服务器端为所有客户端设置(这不是我的选择)。
我正在创建我的连接工厂,然后使用以下代码创建一个 Apache Camel jms 端点:
TibjmsConnectionFactory connectionFactory = new TibjmsConnectionFactory();
connectionFactory.setServerUrl(properties.getProperty(endpoints.getServerUrl()));
connectionFactory.setUserName(properties.getProperty(endpoints.getUsername()));
connectionFactory.setUserPassword(properties.getProperty(endpoints.getPassword()));
JmsComponent emsComponent = JmsComponent.jmsComponent(connectionFactory);
emsComponent.setAsyncConsumer(true);
emsComponent.setConcurrentConsumers(Integer.parseInt(properties.getProperty("jms.concurrent.consumers")));
emsComponent.setDeliveryPersistent(false);
emsComponent.setClientId("MyClient." + ManagementFactory.getRuntimeMXBean().getName() + "." + emsConnectionNumber.getAndIncrement());
return emsComponent;
我正在使用 tibjms-6.0.1、tibjmsufo-6.0.1 和其他各种 tib***-6.0.1。