PHPackages                             johndev/hermes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. johndev/hermes

ActiveLibrary[Queues &amp; Workers](/categories/queues)

johndev/hermes
==============

A simple message broker package

0.1.6-BETA(4y ago)110MITPHPPHP &gt;=7.4

Since Jul 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jortiz3109/hermes)[ Packagist](https://packagist.org/packages/johndev/hermes)[ RSS](/packages/johndev-hermes/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (4)Versions (13)Used By (0)

Hermes
======

[](#hermes)

Hermes is a simple wrapper for popular message brokers

Installation
------------

[](#installation)

Require this package with composer.

```
composer require johndev/hermes
```

This package use the Laravel Package Auto-Discovery, so is not required you to manually add the ServiceProvider.

### No auto-discovery is available

[](#no-auto-discovery-is-available)

If you don't use Laravel auto-discovery, add the ServiceProvider to the providers array in config/app.php.

```
Hermes\Providers\HermesServiceProvider::class,
```

If you want to use the Hermes facade, add this to your facades array in config/app.php.

```
'Hermes' => Hermes\Facades\Hermes::class,
```

### Configuration file

[](#configuration-file)

To publish the configuration file for hermes execute this command into your project.

```
php artisan vendor:publish --provider="JohnDev\Hermes\Providers\HermesServiceProvider"
```

Configuration
-------------

[](#configuration)

### Default broker

[](#default-broker)

To configure the default message broker used by the package, change this in your environment file.

```
HERMES_DEFAULT_BROKER="amqp"
```

### AMQP Message broker configuration

[](#amqp-message-broker-configuration)

VariableDescriptionDefault valueAMQP\_EXCHANGE\_NAMEName of the exchange to useamq.directAMQP\_EXCHANGE\_TYPEType of exchange to be useddirectAMQP\_QUEUE\_NAMEName to the queue to be connectedhermesAMQP\_HOSTThe host to connectAMQP\_PORTPort to be used to connect to amq host5672AMQP\_USERUser to be used to authenticate against hostAMQP\_PASSWORDPassword to be used to authenticate against hostAMQP\_VHOSTVhost to be used to connect to amq host'/'AMQP\_SSL\_PROTOCOLIndicates the ssl protocol to use when connecting to the hostsslUsage
-----

[](#usage)

### Publish

[](#publish)

#### Publish a message

[](#publish-a-message)

```
