A CLI for diffent kinds of message queues.
Go to file
finga 8f93d2d6c8 Fix clippy and remove borrows
Fix clippy lints and remove unneded borrows when logging or printing
macros.
2021-12-03 14:57:38 +01:00
.gitea/issue_template Issue templates for gitea 2021-06-20 18:16:19 +02:00
src Fix clippy and remove borrows 2021-12-03 14:57:38 +01:00
sysvmq Add functions to print information about SysV mqs 2021-07-09 00:31:51 +02:00
.gitignore Initial commit 2021-06-14 03:05:23 +02:00
Cargo.lock Update build dependencies and edition 2021-12-03 14:50:23 +01:00
Cargo.toml Update build dependencies and edition 2021-12-03 14:50:23 +01:00
INSTALL.md Move install section into its own file 2021-07-07 19:40:14 +02:00
README.md Implement `info` command for SysV IPC mqs 2021-07-09 00:29:13 +02:00
mqrs.1 Update descriptions and manpage 2021-10-10 01:19:00 +02:00

README.md

mqrs

mqrs is a small cli application to handle different kinds of message queues.

Install mqrs

For information about how to build, install and run mqrs please see INSTALL.md.

Using mqrs

Depending on which backend you want to use there are different subsets of subcommands. Following backends are supported:

  • posix: Use POSIX message queues
  • sysv: Use SysV IPC message queues

If a command is clearly distinguishable from all the others, it does not have to be completed further.

POSIX message queues

The POSIX backend supports six commands: create, info, list, unlink, send and recv.

Create a message queue

Use the create command to create a new POSIX message queue. Following optional arguments are supported:

  • -c, --capacity: Maximum number of messages in the queue
  • -m, --mode: Permissions (octal) to create the queue with
  • -s, --msgsize: Message size in bytes

Print information about a message queue

Use the info command to print further information about a message queue.

List all message queues

Use the list command to print a list of all message queues. Following option argument is supported:

  • -a, --all: Print all available information

Delete a message queue

Use the unlink command to delete a message queue.

Send a message to a queue

Use the send command to send a message to a message queue. Following optional arguments are supported:

  • -n, --non-blocking: Do not block
  • -d, --deadline <deadline>: Deadline until messages are sent (format: %Y-%m-%d %H:%M:%S)
  • -p, --priority <priority>: Set a different priority than default, priority >= 0 [default: 0]
  • -o, --timeout <timeout>: As for example in "5h 23min 42ms"

Receive a message from a queue

Use the recv command to receive one or more messages from a message queue. Following optional arguments are supported:

  • -f, --follow: Print messages as they are received
  • -n, --non-blocking: Do not block
  • -t, --timestamp: Print a timestamp before each message
  • -d, --deadline <deadline>: Deadline until messages are received (format: %Y-%m-%d %H:%M:%S)
  • -o, --timeout <timeout>: As for example in "5h 23min 42ms"

SysV IPC message queues

The SysV IPC backend supports two commands: create and unlink.

Create a message queue

Use the create command to create a new SysV IPC message queue. Following optional arguments are supported:

  • -m, --mode: Permissions (octal) to create the queue with. Default: 0644.

Print information about a message queue

Use the info command to print further information about a message queue. Exactly of the following arguments is mandatory:

  • -i, --id id: Id of the queue
  • -k, --key key: Key of the queue

List all message queues

Use the list command to print a list of all message queues. No further arguments are supported.

Delete a message queue

Use the unlink command to delete a message queue. This can either be done by providing a key or an id of the queue:

  • -i, --id <id>: Id of the queue
  • -k, --key <key>: Key of the queue