@dra2020/memsqs
TypeScript icon, indicating that this package has built-in type declarations

1.0.56 • Public • Published

memsqs

Client and server for in-memory simple queuing service ala AWS SQS Fifo queue.

This provides an http service that responds to requests to send, receive and remove messages from any number of queues.

Clients send and receive from the service.

Each message should provide a unique message ID.

Messages are delivered in the order received from the queuing service.

Each message can optionally provide a group ID.

There is a convenient semantics that once a client has received a message from a particular group, that group becomes invisible to other clients for a configurable timeout until any received messages have been removed from the queue.

This can ensure that subsequent messages to that group are all received by the same client while it continues to actively process them.

A client can also explicitly 'claim' a group ID even if messages with that group ID are not flowing through the queue. This prevents another the ownership claim from timing out at the queueing service even when a client wants to continue receiving those messages (because it continues to have allocated resources dedicated to processing it, for example). Ownership claims also age out and need to be renewed explicitly.

Once a message has been received, it should be explicitly removed from the queue. If it is not removed, it will become visible to another client after a configurable timeout.

The special group ID '' can be used to send a multicast to explicitly owned groups in a queue. So each client can claim its own group ID in a queue and messages that are sent to the group ID '' will be exploded to be sent to each separate group. This provides a mechanism for one or more producers to broadcast to a set of consumers.

Dependents (0)

Package Sidebar

Install

npm i @dra2020/memsqs

Weekly Downloads

1

Version

1.0.56

License

MIT

Unpacked Size

458 kB

Total Files

29

Last publish

Collaborators

  • alecramsay
  • terrencecrowley
  • davebradlee