Java Client: How to set ttl (seconds) when creating a queue
I am trying to find a way of how to set a ttl property in seconds when creating a new queue via jms. Currently I'm using the EndpointProperties which provides only the option to respect the ttl (I guess that can come as a value in headers from the messages). By default when a queue is created and the respect ttl option is set to true, it sets the value of Maximum TTL (sec) to 0. After reading quite of the documentation I can summarize everything in these 2 question:
- Is there a possibility to to set the ttl value in seconds when creating a new queue via jms?
- When setting the respect ttl option and by default Maximum TTL (sec) is set to 0, does that mean that the messages will never expire (even if they have the ttl value set in their headers)?