Question: I'm doing a simple Messaging system for a Windows Mobile in C#. The application consists in sending and receiving simple text messages using a Web service communication. The messages queue should be persistent, avoiding data lost if the connection with the web service fail or the application crash. 

I know about MSMQ, RabbitMQ, DotNetMQ, but they should be installed in the device and this are really simple devices, I don't want to install any other tool in each of the mobiles just for this simple task.

I already implemented the function to write an XML serialized queue with the messages into a file and I read and write all the time from this file.

I'd appreciate any better idea to solve this problem.
Thanks

Answer: 
[MSMQ](https://msdn.microsoft.com/en-us/library/ms834460.aspx) does not need to be installed is supported natively on Windows Mobile 6.5 devices. BTW: there are still many vendors in industrial area providing WM65 based devices, so this is not yet outdated.

The Windows Mobile (CE) based MSMQ is persistent and simple to use. It is normally used for interprocess-communication on the device or for client server communication (which requires MSMQ installed on the 'server').

So, the main thread creates a MSMQ, one thread in your process fills the MSMQ and another can 'peek' and, after successful transmission, 'dequeue' messages from the same MSMQ. See [here](https://msdn.microsoft.com/en-us/library/ms172497%28v=vs.90%29.aspx) for a simple example.
Sure, there is a better idea is to use [SQLite](https://www.sqlite.org/).
I hope this will help you.