[英]How to Check dependency service is working or not, before consume the message in ActiveMQ
my application built on top of spring-framework 我的应用程序基于spring-framework
i need to stamp the digital signature in my pdf, if the third party digital-signature server is down, i don't want my consumer to take message for queue. 我需要在pdf文件中标记数字签名,如果第三方数字签名服务器关闭,我不希望我的消费者将消息放入队列。
if any possibility to add dependency in consumer before consume message 在消耗消息之前是否有可能在使用者中添加依赖项
This scenario is a textbook use case for using consumer-side transactions with enterprise messaging. 此方案是教科书用例,用于将消费者方事务与企业消息传递一起使用。 Use the SESSION_TRANSACTED or ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE mode in the session. 在会话中使用SESSION_TRANSACTED或ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE模式。 This allows you to roll the message back to the broker in the event the downstream system is down. 这使您可以在下游系统关闭的情况下将消息回滚到代理。 You can add delays or retries within your consumer program, and only acknowledge the message when you know its been sent to the other system. 您可以在使用者程序中添加延迟或重试,并且仅在知道该消息已发送到另一个系统时才对其进行确认。
ref: http://activemq.apache.org/how-do-transactions-work.html 参考: http : //activemq.apache.org/how-do-transactions-work.html
Circuit break won't help you if your reliable() path is down as well. 如果您的authenticate()路径也断开,则断路将不会对您有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.