Download the PHP package krak/symfony-messenger-redis without Composer

On this page you can find all versions of the php package krak/symfony-messenger-redis. 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 symfony-messenger-redis

Symfony Messenger Redis Adapter

PHP Tests

This provides custom Redis List Integration with the Symfony Messenger ^4.4 system.

The standard redis implementation requires redis 5.0 and utilizes the streams feature, this adapter uses redis lists to power the queue functionality.

Installation

Install with composer at krak/symfony-messenger-redis.

If symfony's composer install doesn't automatically register the bundle, you can do so manually:

Usage

You can use this queue with the following config for the framework messenger:

Where MESSENGER_TRANSPORT_DSN env is like: redis://localhost:6379

This will register a transport named acme_redis which will properly use the configured Redis transport from this library.

Unique Messages

If you ever need to ensure that you a specific job needs to be unique while waiting in the queue, you can use the UniqueStamp.

If you don't pass an identifier to enforce uniqueness, the transport will perform an md5 hash of the message body to create an identifier.

Example usage of this stamp:

Delayed Messages

This library supports the DelayStamp provided by the core SF messenger.

Debounce Messages

You can use DebounceStamp to debounce message sending to transport.

DebounceStamp is similar to the DelayStamp, but essentially, if a debounced message is new, we enter it into the queue exactly like a unique & delayed message would. But if there is a similar message still waiting to be queued, then we would remove it, and re-add it with the new delay. For anyone not aware of what debounce is, https://redd.one/blog/debounce-vs-throttle

Available Options

Here are the available options that can be provided to the transport options array or as query parameters:

TLS Support

To enable TLS support, make the DSN schema rediss:// instead of redis:// to note that the redis client should connect with TLS.

Processed Queue

This library uses the rpoplpush reliable queue pattern. It's important to note however that this library does not make any attempt to clean up that processed queue.

We've made great strides to make sure that when everything is working right, that the processing queue is always cleaned up, even when using the autoscaling receiver.

However, if for some reason a worker is killed via SIGKILL (aka kill -9), there are chances the worker process could leave a processing item in the queue because it didn't finish it's process. Overtime, this might cause the _processing to accrue messages that don't need to be there.

It won't hurt anything other than storage to have those _processing lists take up space. It also shouldn't hurt anything to periodically just wipe out those lists using the DEL command. But that would need to be verified that it wouldn't hurt any running workers (which I don't think it will).

Using Symfony's Redis Transport at the same time

Both symfony's redis and the krak redis transport register the dsn prefix: redis://. In the scenario that you want to support both transports, you'll need to use the use_krak_redis option to disable this libraries redis transport.

Testing

You can run the test suite with: composer test

You'll need to start the redis docker container locally in order for the Feature test suite to pass.

Keep in mind that you will need to have the redis-ext installed on your local php cli, and will need to start up the redis instance in docker via docker-compose.


All versions of symfony-messenger-redis with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
ext-redis Version *
symfony/messenger Version ^4.4|^5.4|^6.2
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 krak/symfony-messenger-redis contains the following files

Loading the files please wait ....