Go to the Queue on weblogic Admin Console. Select Overrides tab. There is a Time-to-live Override option. You can set your message duration there. This will overrirde the time to live set by the producer.
When i give Time-to-live=2628000000 milliseconds i.e., 1 month, it says:
Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error [Management:141191]The prepare phase of the configuration update failed with an exception:
Message icon - Error VALIDATION PROBLEMS WERE FOUND problem: cvc-enumeration-valid: string value 'No-Delivery' is not a valid enumeration value for delivery-mode-type in namespace http://xmlns.oracle.com/weblogic/weblogic-jms:<null>
I think you ran into a known Bug that has been fixed in recent versions/service-packs (sorry, I don't know the version number). Setting the delivery mode override to Persistent is fine as a work-around as long as you're sure that your applications don't send non-persistent messages to the affected destinations. If this is a concern and you need to force the delivery mode override back to its default whilst still keeping your time-to-live override, I think you can probably do this by shutting down your domain, then editing your XML to remove the delivery mode override stanza, and finally restarting...