Are message queues obsolete in linux?

后端 未结 4 831
渐次进展
渐次进展 2021-01-29 19:38

I\'ve been playing with message queues (System V, but POSIX should be ok too) in Linux recently and they seem perfect for my application, but after reading The Art of Unix Progr

4条回答
  •  暖寄归人
    2021-01-29 19:59

    I haven't actually used POSIX message queues because I always want to leave open the option to distribute my messages across a network. With that in mind, you might look at a more robust message-passing interface like zeromq or something that implements AMQP.

    One of the nice things about 0mq is that when used from the same process space in a multithreaded app, it uses a lockless zero-copy mechanism that is quite fast. Still, you can use the same interface to pass messages over a network as well.

提交回复
热议问题