Download the PHP package sroze/messenger-enqueue-transport without Composer

On this page you can find all versions of the php package sroze/messenger-enqueue-transport. 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 messenger-enqueue-transport

Enqueue's transport for Symfony Messenger component

This Symfony Messenger transport allows you to use Enqueue to send and receive your messages from all the supported brokers.

Usage

  1. Install the transport

  2. Configure the Enqueue bundle as you would normaly do (see Enqueue's Bundle documentation). If you are using the recipes, you should just have to configure the environment variables to configure the default Enqueue transport:

  3. Configure Messenger's transport (that we will name amqp) to use Enqueue's default transport:

  4. Route the messages that have to go through the message queue:

  5. Consume!

Advanced usage

Configure the queue(s) and exchange(s)

In the transport DSN, you can add extra configuration. Here is the common reference DSN (note that the values are just for the example):

Setting Custom Configuration on your Message

Each Enqueue transport (e.g. amqp, redis, etc) has its own message object that can normally be configured by calling setter methods (e.g. $message->setDeliveryDelay(5000)). But in Messenger, you don't have access to these objects directly. Instead, you can set them indirectly via the TransportConfiguration stamp:

Send a message on a specific topic

You can send a message on a specific topic using TransportConfiguration envelope item with your message:

Use AMQP topic exchange

See https://www.rabbitmq.com/tutorials/tutorial-five-php.html

You can use specific topic and queue options to configure your AMQP exchange in topic mode and bind it:

Here is the way to send a message with a routing key matching this consumer:

Configure custom Kafka message

Here is the way to send a message with with some custom options:


$this->bus->dispatch((new Envelope($message))->with(new TransportConfiguration([
    'topic' => 'test_topic_name',
    'metadata' => [
        'key' => 'foo.bar',
        'partition' => 0,
        'timestamp' => (new \DateTimeImmutable())->getTimestamp(),
        'messageId' => uniqid('kafka_', true),
    ]
])))

All versions of messenger-enqueue-transport with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
enqueue/enqueue-bundle Version ^0.10
symfony/messenger Version ^5.4 || ^6.3 || ^7.0
symfony/options-resolver Version ^5.4 || ^6.3 || ^7.0
enqueue/amqp-tools Version ^0.10
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 sroze/messenger-enqueue-transport contains the following files

Loading the files please wait ....