Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanstowe/mq-posix
Raku binding for POSIX message queues
https://github.com/jonathanstowe/mq-posix
messagequeue mq posix raku
Last synced: 25 days ago
JSON representation
Raku binding for POSIX message queues
- Host: GitHub
- URL: https://github.com/jonathanstowe/mq-posix
- Owner: jonathanstowe
- License: artistic-2.0
- Created: 2017-04-11T20:56:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-01T10:30:57.000Z (over 1 year ago)
- Last Synced: 2023-07-01T11:25:02.223Z (over 1 year ago)
- Topics: messagequeue, mq, posix, raku
- Language: Raku
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# MQ::Posix
Raku binding for POSIX message queues
![Build Status](https://github.com/jonathanstowe/MQ-Posix/workflows/CI/badge.svg)
## Synopsis
```raku
use MQ::Posix;
my $queue = MQ::Posix.new(name => 'test-queue', :create, :r );
react {
whenever $queue.Supply -> $buf {
say $buf.decode;
}
whenever signal(SIGINT) {
$queue.close;
$queue.unlink;
done;
}
}
```And in some separate process:
```raku
use MQ::Posix;
my $queue = MQ::Posix.new(name => 'test-queue', :create, :w );
await $queue.send("some test message", priority => 10);
$queue.close;
```
## Description
POSIX message queues offer a mechanism for processes to reliably exchange
data in the form of messagesThe messages are presented as a priority ordered queue with higher priority
messages being delivered first and messages of equal priority being delivered
in age order.The mechanism is simple, having no provision for message metadata and so forth
and whilst reliable, unread messages do not persist beyond the lifetime of the
running kernel.## Install
If you have a working installation of Rakudo you should be able to install this with *zef* :
zef install MQ::Posix
# or from a local clone
zef install .
## Support
This should work on any operating system that has good modern POSIX
support, however some systems may not enable kernel message queues by
the default and you may need some kernel build configuration to do so.
Also the limits and defaults for number of messages and maximum message
sizes are set in different ways as this is not explicitly stated in the
standard, on Linux, for example, you can use the ```sysctl``` interface
to control these parameters, on other systems you may need to supply
them as kernel build configuration.If this doesn't work as expected or you have new features that you would like to see please post in https://github.com/jonathanstowe/MQ-Posix/issues
## Licence & Copyright
This is free software, please see the [LICENCE](LICENCE) for details.
© Jonathan Stowe 2017 - 2021