The paging can disrupt the order of message delivery in the following way:
1. Starting a queue with fullSize=20, pageSize=10, downCacheSize=10
2. Sending 35 persistent messages (m0 to m34) to the queue
3. The JBM_MSG_REF table will look like this:
+------------------+----------+ | MESSAGE_ID | PAGE_ORD | +------------------+----------+ | m0's id | NULL | | .... | NULL | | m19's id | NULL | | m20's id | 0 | | .... | 5 | | m29's id | 9 | | m30's id | NULL | | .... | NULL | | m34's id | NULL | +------------------+----------+
+------------------+----------+ | MESSAGE_ID | PAGE_ORD | +------------------+----------+ | m0's id | NULL | | .... | NULL | | m18's id | NULL | | m20's id | 0 | | .... | 5 | | m29's id | 9 | | m30's id | NULL | | .... | NULL | | m34's id | NULL | +------------------+----------+
LOAD_UNPAGED_REFS=SELECT MESSAGE_ID, DELIVERY_COUNT, SCHED_DELIVERY FROM JBM_MSG_REF WHERE STATE = 'C' AND CHANNEL_ID = ? AND PAGE_ORD IS NULL ORDER BY ORD