Download the PHP package opsource/rabbitmq without Composer

On this page you can find all versions of the php package opsource/rabbitmq. 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 rabbitmq

RabbitMQ Queue driver Laravel

Version Laravel support Last update
1.0.3 9-10-11 26 June 2024

Installation

You can install this package using this composer:

Configuration

After installation, the package will be published automatically You can find the package configuration file in the path

To use the package, you need to include the following environment variables in your project's ``.env'' file.

RabbitMQ Environment Variables

This section outlines the RabbitMQ environment variables used to configure the connection and behavior of the RabbitMQ client. Optional environment variables that you can use to develop your application

Variable Description
RABBITMQ_HOST The hostname or IP address of the RabbitMQ server. Default: 127.0.0.1.
RABBITMQ_PORT The port number on which RabbitMQ is running. Default: 5672.
RABBITMQ_USERNAME The username for authenticating with RabbitMQ. Default: admin.
RABBITMQ_PASSWORD The password for authenticating with RabbitMQ. Default: admin.
RABBITMQ_VHOST The virtual host to use when connecting to RabbitMQ. Default: /.
RABBITMQ_WORKER The worker mode for message delivery. Default: DELIVERY_MODE_NON_PERSISTENT.
RABBITMQ_CONNECTION The name of the RabbitMQ connection. Default: rabbitmq.
RABBITMQ_MESSAGE_DELIVERY_MODE The delivery mode for messages. Default: DELIVERY_MODE_PERSISTENT.
RABBITMQ_EXCHANGE_NAME The name of the exchange. Default: /.
RABBITMQ_EXCHANGE_DECLARE Whether to declare the exchange. Default: false.
RABBITMQ_EXCHANGE_TYPE The type of exchange (e.g., direct, fanout, topic, headers). Default: [direct fanout topic headers direct].
RABBITMQ_EXCHANGE_PASSIVE Whether the exchange is passive. Default: false.
RABBITMQ_EXCHANGE_DURABLE Whether the exchange should be durable. Default: true.
RABBITMQ_EXCHANGE_AUTO_DEL Whether the exchange should be auto-deleted. Default: false.
RABBITMQ_EXCHANGE_INTERNAL Whether the exchange is internal. Default: false.
RABBITMQ_EXCHANGE_NOWAIT Whether to wait for the exchange to be declared. Default: false.
RABBITMQ_QUEUE_DECLARE Whether to declare the queue. Default: false.
RABBITMQ_QUEUE_PASSIVE Whether the queue is passive. Default: false.
RABBITMQ_QUEUE_DURABLE Whether the queue should be durable. Default: true.
RABBITMQ_QUEUE_EXCLUSIVE Whether the queue is exclusive. Default: false.
RABBITMQ_QUEUE_AUTO_DEL Whether the queue should be auto-deleted. Default: false.
RABBITMQ_QUEUE_NOWAIT Whether to wait for the queue to be declared. Default: false.
RABBITMQ_CONSUMER_TAG The consumer tag. Default: '' (empty string).
RABBITMQ_CONSUMER_NO_LOCAL Whether to consume messages locally. Default: false.
RABBITMQ_CONSUMER_NO_ACK Whether to acknowledge messages automatically. Default: false.
RABBITMQ_CONSUMER_EXCLUSIVE Whether the consumer is exclusive. Default: false.
RABBITMQ_CONSUMER_NOWAIT Whether to wait for the consumer. Default: false.
RABBITMQ_CONSUMER_SLEEP_MS The sleep duration in milliseconds for the consumer. Default: 1000.
RABBITMQ_QOS_ENABLED Whether Quality of Service (QoS) is enabled. Default: false.
RABBITMQ_QOS_PREF_SIZE The prefetch size for QoS. Default: 0.
RABBITMQ_QOS_PREF_COUNT The prefetch count for QoS. Default: 1.
RABBITMQ_QOS_GLOBAL Whether QoS is global. Default: false.

These environment variables help configure the RabbitMQ connection and control various behaviors of the RabbitMQ client.

RabbitMQ Integration Documentation

This document outlines the usage of the RabbitMQManager in your application.

Initialization

First, create an instance of the RabbitMQManager class using the application container:

Alternatively, you can retrieve the RabbitMQ instance directly from the application container using the alias rabbitmq:

Constructor Dependency Injection

To inject the RabbitMQManager into a class using constructor dependency injection, define your class constructor to accept a RabbitMQManager instance:

Getting RabbitMQ Connections

You can retrieve the list of all RabbitMQ connections using the getConnections method provided by the RabbitMQ facade:

Complete Example

Here’s a complete example of how to use RabbitMQManager in a class:

Key Points

This documentation provides a clear and concise explanation of how to use the RabbitMQManager and related functionalities in your application. It covers initialization, dependency injection, and retrieving connections, along with a complete example for better understanding.

RabbitMQ Integration Documentation

This document provides an overview and examples of how to use RabbitMQ for publishing and consuming messages, resolving connections and channels, and configuring the RabbitMQ setup in your application.

Publishing Messages

Single Message Publishing

To publish a single message to the default exchange/topic/queue:

Publish to the default exchange/topic/queue $rabbitMQ->publisher()->publish($message);

Bulk Messages

Publish multiple messages at once:

Consume Messages

Consume through a Closure

Define a handler using a closure to consume messages:

Consume through a Class

Define a handler using a class to consume messages:

Interact with RabbitMQ

Resolve the Default Connection

Get the default connection:

Resolve the Default Channel

Get the default channel:

Configuration

Connection Configuration

Override the default connection configuration:

Message Configuration

Configure the message properties:

Publish Configuration

Configure the publisher and publish a message with specific settings:

Consumer Configuration

Configure the consumer settings:

Example

Running a Consumer

  1. Create a Custom Command:

  2. Register the Command in app/Console/Kernel.php:

  3. Consume through the Handler:

  4. Call the Command from the Console:

Publishing Messages

  1. Create Route <-> Controller Binding:

  2. Create a Controller to Publish Messages:

By following this documentation, you can effectively publish and consume messages using RabbitMQ in your application.

This documentation provides a comprehensive guide on how to set up, configure, publish, and consume messages using RabbitMQ, along with example code and commands for better understanding.

License

The MIT License (MIT). Please see License File for more information.


All versions of rabbitmq with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2.0
ext-json Version *
illuminate/support Version ^9.0|^10.0|11.*
php-amqplib/php-amqplib Version ^v3.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 opsource/rabbitmq contains the following files

Loading the files please wait ....