LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   POSIX Queues with message type facility of System V queues (http://www.linuxquestions.org/questions/programming-9/posix-queues-with-message-type-facility-of-system-v-queues-777621/)

ehsan_haq98@yahoo.com 12-23-2009 01:41 AM

POSIX Queues with message type facility of System V queues
 
Hello Everyone,
We have been using System V message queues for quite some time. Each of our process has two kinds of queues. (1) For receiving transaction messages, which is different for each process and (2) For receiving control messages, which is global for all processes. Each process get its relevant message from (2) based on the process id of that process (using the process id in the message type of msgbuf struct).

Now we are looking to use POSIX queues. I have gone through the documentation but could not find a way to resolve (2).

Can we do selective receive on POSIX queue, based on some message type?

Thanks
Ehsan

Mara 12-27-2009 11:43 AM

Quote:

Originally Posted by ehsan_haq98@yahoo.com (Post 3802059)
Can we do selective receive on POSIX queue, based on some message type?

On message type, no. Instead, however, you may use priorities. It usually maps quite well.

Mara 12-27-2009 11:45 AM

When it comes to the message types with process ids... Isn't it a better idea to use more separate queues if you have such application design?


All times are GMT -5. The time now is 11:12 PM.