Download the PHP package m6web/redis-message-broker without Composer

On this page you can find all versions of the php package m6web/redis-message-broker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package redis-message-broker

RedisMessageBroker

This component will help you to build a messages brocker system over a redis backend. It will take advantage of the redis cluster capabilities with the possibility to shard messages into several redis lists while producing messages. Consumer, in no auto-ack mode, implements a working list to be sure not to loose any messages when processing fail.

By design, producing is super fast (one Redis command) and consuming can be slow if you want to ack messages manually.

You should use it with Redis >= 2.8.

usage

producer

consumer

Consumer should be wrapped in a worker. A unique Id should be pass to the consumer constructor. If you work with a worker, uniqId has to be constant per worker.

inspector

Inspector methods allow you to count the messages in ready or processing in a queue.

cleanup

Cleanup methods let you perform a cleanup in the message queue. Cleanup is very slow as all the message in the queue will be scanned.

queue option

To avoid hotpsots you can shard a queue on several lists :

In this mode, messages will be written and read among the 10 lists. FIFO is no more guaranteed.

consumer options

manual message acknowledgment

with setNoAutoAck()

look for old messages not acked by consumers

Each consumer got an unique Id defined during the construction of the object. This Id allow the consumer to define a unique working list where a message is stored between the getMessage and the ack. Is it possible to use LostMessageConsumer class to look on consumer working lists and move message more than x second old (messageTtl parameter) from those lists to a queue list. The maxRetry parameter will put a message in a dead letter list when the retry number is reached.

messageTtl parameter need to be superior of your max time to process a message. (Otherwise it will consider a message old when its processing)


All versions of redis-message-broker with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
predis/predis Version ^1.1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package m6web/redis-message-broker contains the following files

Loading the files please wait ....