What's the advantage of queues over pipes when communicating between processes? What's the advantage of queues over pipes when communicating between processes? linux linux

What's the advantage of queues over pipes when communicating between processes?


The big win is that queues are process- and thread- safe. Pipes are not: if two different processes try to read from or write to the same end of a pipe, bad things happen. Queues are also at a somewhat higher level of abstraction than pipes, which may or may not be an advantage in your specific case.


Queues hold the messages and retains them until the next time the queue is active and pushes it through...regardless if the pipe or connection is broken...with a pipe/connection, its goodbye to the message with an error...

Hope this helps,Best regards,Tom.