ActiveMQ,代理接收要发送的消息的时间戳
好的,根据 ActiveMQ 文档,看来 Message.getJMSTimestamp() 返回客户端声称发送消息的时间(及其本地时钟)。并且据称属性“JMSActiveMQBrokerInTime”已添加到消息中(请参阅 http:// activemq.apache.org/activemq-message-properties.html)。 但是,尝试在 ActiveMQ 4.1.2 安装上访问它会出现错误。
有谁知道这是5.0或更高版本中才添加的东西吗?或者对于它可能在哪里消失还有其他解释吗? Message.getPropertyNames() 返回空枚举,这可能表明没有任何内容通过。
Ok, as per ActiveMQ docs, it appears that Message.getJMSTimestamp() returns time that client claims it sent the message (with its local clock). And that there is supposedly property "JMSActiveMQBrokerInTime" that is added to Message (see http://activemq.apache.org/activemq-message-properties.html).
However, trying to access it on an ActiveMQ 4.1.2 installation gives an error.
Does anyone know if this is something that was only added in 5.0 or later? Or is there some other explanation as to where it might have disappeared? Message.getPropertyNames() returns empty enumeration, which could indicate that nothing gets through.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这是在 5.x 版本中添加的。如果无法升级,可以考虑创建一个类似TimeStamp插件的插件(http://activemq.apache.org /timestampplugin.html),因为我认为这也仅限于 5.x,并在代理端同步您的时间。
干杯
yes that's added in 5.x version. If you cannot upgrade, you can consider creating a plugin like TimeStamp plugin (http://activemq.apache.org/timestampplugin.html) as I think that is as well 5.x only and sync you times on the broker side.
Cheers