Whether a client will receive expired messages or not can be configured via the Queue Manager's attribute "deliver-expired-messages". Default is false.
Messages which are expired (means which JMS expiration time is > 0 and < the current time of the router's host) are purged from the queue by so-called cleanup processes. These processes are being started in intervals.
The cleanup interval is specified via the attribute "cleanup-interval". This attribute is part of the configuration for regular user-defined queues. For system queues (routing, temporary queues, durable subscriber queues, deadletter queues) it is part of the configuration of the particular system queue controller.
A cleanup process will log every expired message in the router's warning log file by default. Because this can lead to huge log files, the logging can be switched off via the attribute "log-expired-messages".
An alternate way to cleanup expired messages is to use the predefined Queue Manager jobs "Queue Cleanup" or "Queue Cleanup DLQ". This saves router resources because it is often not necessary to check many queues whether they contain expired messages if the are empty or will never contain those messages.
To use this jobs, the cleanup-interval attribute of the resp. queue must be set to 0 or -1 which disables the default cleanup process on this queues. Then schedule a "Queue Cleanup" or "Queue Cleanup DLQ" from the Scheduler Swiftlet.
The "Queue Cleanup" job just purges expired messages while the "Queue Cleanup DLQ" job moves the expired messages to the router's deadletter queue "routerdlq" from which the expired messages can be consumed from a JMS application. The queue "routerdlq" is predefined from the Queue Manager Swiftlet and configured to deliver expired messages to JMS clients regardless of the setting of attribute "deliver-expired-messages".