is it possible to somehow make sure that message order is retained when exporting and importing queues? It seems as though this is somewhat shuffled around, at least the import does not match the filename order from the directory specified for import.
Messages are ordered in a queue by 1) priority and 2) message index (seq no). This is the order how they are exported. It is the same order as if you were consuming them from a queue.
On import the priority is the first order. The message index (seq no) is new assigned. So if you import messages in a queue with different priorities, they are may have a different order. If all messages in the queue have the same priority as the messages you want to import, they will be appended to the queue.
Now I put some of these files in a directory and import them (all would be too many and take a lot of time).
The first file being:
App_Inbox_0000000241.message, which has the following ID
The last one being:
App_Inbox_0000000280.message, which has the following ID
The last message in the queue at the moment before importing has the following ID:
So I import 40 messages and look for my above message. After I've found it, the next message should have the ID from the file imported first. ID:-1918204342546787530/9574898/routerXY/javamailbridge/App_Inbox_Mailbridge/1458234004643/9246
But the next message has the ID:-1918204342546787530/9574901/routerXY/javamailbridge/App_Inbox_Mailbridge_2/1458234006045/9616
which matches the file App_Inbox_0000000273.message
The last message has the ID:-1918204342546787530/9574898/routerXY/javamailbridge/App_Inbox/1458234004643/9262
which matches the file App_Inbox_0000000275.message
I found the ID from App_Inbox_0000000280.message at the 5th index from the back of the queue. I can not make any order from this.