I'm currently using message queue to pass message between two processes, but I'm hitting 32k maximum size limit. What's the best option. Fragmenting the message and then re-asembling or using TCP/IP sockets to communicate between processes or anything you guys could help me with.
Only you can determine the right answer but unix domain sockets are probably your best alternative if you don't want to split/reconstruct the messages. Shared memory would be faster but has the associated synchronization headaches.
If the program(s) reading/writing the queue are single threaded then splitting the messages is easy enough - basically put a byte at the beginning of each segment indicating if it is a new message or a continuation of a previous one. If they are threaded I would bite the bullet and switch to something else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With