Download the PHP package kakaprodo/laravel-message-broker without Composer

On this page you can find all versions of the php package kakaprodo/laravel-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 laravel-message-broker

Laravel Message Brokers

A RabbitMQ message broker for Laravel that provides clean routing, similar to Laravel's route system, for sending and consuming messages.

Prerequisites

Before installing, ensure your project meets the following requirements:

We assume that you have RabbitMQ installed on your computer.

Installation

Run the following Composer command:

Setup

1. Publish Package Files

Before using the package, publish its configuration and route files:

This will publish:

2. Configure Environment Variables

Add the following RabbitMQ connection settings to your .env file:

Usage

Sending Messages

You can send messages to a specific subscriber or broadcast to multiple subscribers.

Send Direct Message

Use the sendTo method to send a message to a specific subscriber by providing the exchange_name, payload_message, and routing_key.

Broadcast Message

Use the broadcast method to send a message to all subscribers of an exchange.

Subscribing to Exchanges

You can subscribe to fanout (broadcast), direct, and topic messages. Define routes in routes/message-broker.php.

Broadcasted Messages

Subscribe to broadcast messages using any:

Direct Messages

Subscribe to a direct message by specifying the exchange_name and routing_key:

Subscribe to multiple routing keys:

Topic Messages

Subscribe to topic messages by specifying the topic exchange and routing key:

Message Handlers

The package supports three types of handlers:

  1. Closure Handler

  2. PHP Action Classes

    The class should have a handle method:

  3. Custom Data Action Classes (kakaprodo/custom-data)

Consuming Messages

After defining your subscription routes, you can start processing published messages using the following Artisan command:

If there are any messages that are stuck and you want to acknowledge them so they are not repeatedly pulled, use the --ack flag:


All versions of laravel-message-broker with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
laravel/framework Version >=8.0
kakaprodo/custom-data Version >=2.3.3 || dev-develop
php-amqplib/php-amqplib Version ^3.7
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 kakaprodo/laravel-message-broker contains the following files

Loading the files please wait ...