# Posix\_mq - POSIX message queues for Ruby

**URL:** <https://www.ruby-forum.com/t/posix-mq-posix-message-queues-for-ruby/180971>\
**Category:** Ruby\
**Created:** [January 2, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/posix-mq-posix-message-queues-for-ruby/180971 "2010-01-02T13:20:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [January 2, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/posix-mq-posix-message-queues-for-ruby/180971/1 "2010-01-02T13:20:31Z")

</div>

POSIX message queues allow local processes to exchange data in the form  
of messages. This API is distinct from that provided by System V  
message queues, but provides similar functionality.

- [posix\_mq - POSIX message queues for Ruby](http://bogomips.org/ruby_posix_mq/)
- removed\_email\_address@domain.invalid
- git://git.bogomips.org/ruby\_posix\_mq.git

POSIX message queues may be implemented in the kernel for fast,  
low-latency communication between processes on the same machine.  
POSIX message queues are not intended to replace userspace,  
network-aware message queue implementations.

== Features

- Supports message notifications via signals.

- Supports portable non-blocking operation. Under Linux 2.6.6+ only,  
POSIX\_MQ objects may even be used with event notification mechanisms  
such as IO.select.

- Optional timeouts may be applied to send and receive operations.

- Thread-safe under Ruby 1.9, releases GVL before blocking operations.

- Documented library API

- Includes a generic “posix-mq.rb” command-line tool with manpage.

== Install

Operating system support (or library emulation) for POSIX message queues  
is required. Most modern GNU/Linux distributions support this  
out-of-the-box.

If you’re using a packaged Ruby distribution, make sure you have a C  
compiler and the matching Ruby development libraries and headers.

If you plan on using the command-line client, a tarball installation  
starts up faster and is recommended. Just grab the tarball from:

[http://bogomips.org/ruby\_posix\_mq/files/](http://bogomips.org/ruby_posix_mq/files/)  
Unpack it, and run “ruby setup.rb”

Otherwise, via RubyGems: gem install posix\_mq

== Development

You can get the latest source via git from the following locations:

git://git.bogomips.org/ruby\_posix\_mq.git  
git://repo.or.cz/ruby\_posix\_mq.git (mirror)

You may browse the code from the web and download the latest snapshot  
tarballs here:

- [POSIX message queues for Ruby](http://git.bogomips.org/cgit/ruby_posix_mq.git) (cgit)
- [Public Git Hosting - ruby\_posix\_mq.git/summary](http://repo.or.cz/w/ruby_posix_mq.git) (gitweb)

Inline patches (from “git format-patch”) to the mailing list are  
preferred because they allow code review and comments in the reply to  
the patch.

We will adhere to mostly the same conventions for patch submissions as  
git itself. See the Documentation/SubmittingPatches document  
distributed with git on on patch submission guidelines to follow. Just  
don’t email the git mailing list or maintainer with posix\_mq patches.

== Contact

All feedback (bug reports, user/development discussion, patches, pull  
requests) go to the mailing list: [mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [January 3, 2010, 6:58am UTC](https://www.ruby-forum.com/t/posix-mq-posix-message-queues-for-ruby/180971/2 "2010-01-03T06:58:43Z")

</div>

POSIX message queues allow local processes to exchange data in the form  
of messages. This API is distinct from that provided by System V  
message queues, but provides similar functionality.

- [posix\_mq - POSIX message queues for Ruby](http://bogomips.org/ruby_posix_mq/)
- removed\_email\_address@domain.invalid
- git://git.bogomips.org/ruby\_posix\_mq.git

POSIX message queues may be implemented in the kernel for fast,  
low-latency communication between processes on the same machine.  
POSIX message queues are not intended to replace userspace,  
network-aware message queue implementations.

Changes:

This release fixes notification (un)registration and should be  
fully-supported on modern FreeBSD (7.2+) releases.

POSIX\_MQ#notify=nil correctly unregister notification requests.  
POSIX\_MQ#notify=false now provides the no-op SIGEV\_NONE  
functionality. Under FreeBSD, using IO.select on POSIX\_MQ  
objects is now possible as it has always been under Linux.
