If, under UNIX/Linux/BSD/OSX, I use this sequence of APIs in Application A:
msgq_id = mq_open( full_queue_name,
O_RDWR | O_CREAT,
S_IRWXU | S_IRWXG,
&msgq_attr);
mq_send(msgq_id, ptrData1, len1, 0);
mq_send(msgq_id, ptrData2, len2, 0);
...
and this sequence of events in Application B:
mqd_t open_res = mq_open(full_queue_name, O_RDONLY);
...
mq_receive(...)
mq_receive(...)
... do I have a guarantee that the message queue maintains the order of the messages? That is, that Application B will receive the data from ptrData1 first, and then the data from ptrData2?