I would like to configure a durable topic, but I want to configure how long Apache ActiveMQ Artemis will hold onto a message for an inactive durable subscriber to the topic.
For example, something like "Save durable messages for up to 30 seconds for inactive durable subscribers". If the subscriber does not become active within 30 seconds, the message is no longer available for them when they do become active.
Is this something that can be done? If not, does Artemis or JMS provide an alternative way to accomplish this or something similar.
ActiveMQ Artemis doesn't have exactly the functionality you're looking for, but you can get close using the expiry-delay
address-setting
which will apply an expiration time to message which don't already have their expiration time set. See the configuration details in the documentation. This will ensure that messages expire rather than accumulating in the inactive durable subscription.