Set TTL Apache Camel JAva DSL

后端 未结 2 1287
闹比i
闹比i 2021-01-28 01:16

How do you set the TTL for a message when using Java DSL?

I have something like this:

...
from (\"timer:something?delay=3000&period=15000\")
   ...
          


        
2条回答
  •  深忆病人
    2021-01-28 01:59

    I assume TTL means Time to Live.

    In Camel this is component specific how they deal with this. Some components support this, and others do not.

    You should check the documentation for the component you use, what it supports.

    If you use JMS component then it has the timeToLive option as documented: http://camel.apache.org/jms

    And mind about the problem with "client and server clock's can be out of sync". There is some details on the Camel JMS page. Some message brokers has ways to sync the clocks, such as Apache ActiveMQ with its timestamp plugin: http://activemq.apache.org/timestampplugin.html

提交回复
热议问题