Questions tagged [mqueue]
38 questions
49
votes
4 answers
How do I use mqueue in a c program on a Linux based system?
How do I use mqueue (message queue) in a c program on a Linux based system?
I'm looking for some good code examples that can show how this is done in a correct and proper way, maybe a howto.

Johan
- 20,067
- 28
- 92
- 110
15
votes
1 answer
send struct in mq_send
I am using POSIX IPC and according to the documentation - http://man7.org/linux/man-pages/man3/mq_send.3.html
mq_send() method only sends char* data and mq_recv() recieves only character data.
However, I want to send a custom struct to my msg queue…

Vinit Sharma
- 461
- 2
- 8
- 16
10
votes
1 answer
Cannot create more than 10 mqueues
I am using a python module that wraps the posix real time extensions to get MessageQueues.
This is the python code
#!/usr/bin env python
import uuid
import posix_ipc
import time
def spawn():
return posix_ipc.MessageQueue("/%s" % uuid.uuid4(),…

Jakob Bowyer
- 33,878
- 8
- 76
- 91
3
votes
1 answer
mqueue receive wrong data
Below is the code for an assignment on processor farming. The focus is on the comments with "HERE $resp is always the same/different". That's my problem: when the worker process does it's job and sends the response data to the farmer, the farmer…

wraithie
- 343
- 1
- 6
- 19
3
votes
0 answers
How to pull latest remote changes into remote repo (while using mqueues)
The hg book recommends the following workflow for updating your mqueue patches when the remote repository has been updated Link:
hg qpush --all
# QSave is now depricated (according to hg qsave --help). It appears to have been
# depricated since at…

sixtyfootersdude
- 25,859
- 43
- 145
- 213
3
votes
1 answer
Unable To Create More Than 5 Mqueues
I'm having a problem with creating mqueues, namely my system appears to block me from creating more than 5 mqueues, even though /proc/sys/fs/mqueue/queues_max is set to 256. I'm running Ubuntu 13.04 server on an a Q7 module system with a Atom E680T,…

Skid
- 95
- 6
2
votes
1 answer
C++ mq_receive EMSGSIZE problem
I'm trying to send message "test" with mqueue, but message receiving fails with EMSGSIZE.
Code:
#include
#include
#include
#include
#include
#include
#include
#include…

skayred
- 10,603
- 10
- 52
- 94
2
votes
1 answer
How to IPC between node and python using posix message queue?
I'm trying to write a "hello world" of IPC between a node js and a python3 application. At the moment I'm having a parse error when a new message arrives the Python app. The codes are:
Python:
from ipcqueue import posixmq
from time import sleep
q1…

Fnr
- 2,096
- 7
- 41
- 76
2
votes
1 answer
MQ queues vs Batch process : how to replay asynchronous process when it fails
As part of the development of a middleware, I need to choose between two mechanisms to do asynchronous processing (with the possibility of replaying failure cases)
I have as ideas the two following techniques:
Use the MQ queues (during an error,…

mboudhina
- 130
- 1
- 11
2
votes
5 answers
Pthread win32 libraray, PTHREAD_PROCESS_SHARED not supported
I am using pthread win32 library to implement mqueue.
But when it runs into following code, it throw #40 error should be ENOSYS, means system not supported.
pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED);
i =…

Alex.Yang
- 419
- 1
- 6
- 11
2
votes
2 answers
Do UNIX message queues maintain order of messages?
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);
…

ttsiodras
- 10,602
- 6
- 55
- 71
2
votes
1 answer
POSIX message queues folder
I've been working remotely with POSIX message queues for some days. Now I want to do it in my own PC but I've found that there's no /dev/mqueue folders where queues are created; which means that I don't know where they are (of whether there are or…

eduherminio
- 1,514
- 1
- 15
- 31
2
votes
1 answer
bad file descriptor in posix mqueue
Anybody could please help me to resolve the issue of bad file descriptor in posix mqueue. I am trying to read RAW socket packets and to place them in…

Ashok Kumar
- 21
- 1
- 5
2
votes
1 answer
When Creating a POSIX Message Queue, Why Do the Names Need to Be Preceded With a Forward Slash
Is there a particular reason that POSIX message queues require the name be preceded with a '/'?
For example, if were to attempt to open a message queue with the name "thequeue". I would have to use:
mq_open("/thequeue", O_RDONLY);

Benjamin Cannon
- 23
- 3
2
votes
0 answers
Handling mq_open failures after mq_unlink
I'm writing a client/server process on Suse Linux using Posix message queues to communicate, similar to the accepted answer in "How do I use mqueue in a c program on a Linux based system?". When the server dies, it does an mq_close and mq_unlink.…

PeterS6g
- 122
- 11