You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
4.2 KiB
117 lines
4.2 KiB
<?php
|
|
|
|
use PhpAmqpLib\Message\AMQPMessage;
|
|
use PhpAmqpLib\Connection\AMQPLazySSLConnection;
|
|
|
|
return [
|
|
/**
|
|
* Default connection
|
|
*/
|
|
'default' => env('AMQP_CONNECTION', 'rabbitmq'),
|
|
|
|
/**
|
|
* Available connections
|
|
*/
|
|
'connections' => [
|
|
'rabbitmq' => [
|
|
'connection' => [
|
|
/**
|
|
* Lazy connection does not support more than 1 host
|
|
* Change connection **class** if you want to try more than one host
|
|
*/
|
|
'class' => AMQPLazySSLConnection::class,
|
|
'hosts' => [
|
|
[
|
|
'host' => env('AMQP_HOST', 'localhost'),
|
|
'port' => env('AMQP_PORT', 5672),
|
|
'user' => env('AMQP_USER', ''),
|
|
'password' => env('AMQP_PASSWORD', ''),
|
|
'vhost' => env('AMQP_VHOST', '/'),
|
|
],
|
|
],
|
|
/**
|
|
* Pass additional options that are required for the AMQP*Connection class
|
|
* You can check *Connection::try_create_connection method to check
|
|
* if you want to pass additional data
|
|
*/
|
|
'options' => [],
|
|
],
|
|
|
|
'message' => [
|
|
'content_type' => env('AMQP_MESSAGE_CONTENT_TYPE', 'text/plain'),
|
|
'delivery_mode' => env('AMQP_MESSAGE_DELIVERY_MODE', AMQPMessage::DELIVERY_MODE_PERSISTENT),
|
|
'content_encoding' => env('AMQP_MESSAGE_CONTENT_ENCODING', 'utf-8'),
|
|
],
|
|
|
|
'exchange' => [
|
|
'name' => env('AMQP_EXCHANGE_NAME', 'amq.direct'),
|
|
'declare' => env('AMQP_EXCHANGE_DECLARE', false),
|
|
'type' => env('AMQP_EXCHANGE_TYPE', 'direct'),
|
|
'passive' => env('AMQP_EXCHANGE_PASSIVE', false),
|
|
'durable' => env('AMQP_EXCHANGE_DURABLE', true),
|
|
'auto_delete' => env('AMQP_EXCHANGE_AUTO_DELETE', false),
|
|
'internal' => env('AMQP_EXCHANGE_INTERNAL', false),
|
|
'no_wait' => env('AMQP_EXCHANGE_NOWAIT', false),
|
|
'arguments' => [],
|
|
'ticket' => env('AMQP_EXCHANGE_TICKET'),
|
|
],
|
|
|
|
'queue' => [
|
|
'name' => env('AMQP_QUEUE_NAME', 'amqp.laravel.queue'),
|
|
'declare' => env('AMQP_QUEUE_DECLARE', true),
|
|
'passive' => env('AMQP_QUEUE_PASSIVE', false),
|
|
'durable' => env('AMQP_QUEUE_DURABLE', true),
|
|
'exclusive' => env('AMQP_QUEUE_EXCLUSIVE', false),
|
|
'auto_delete' => env('AMQP_QUEUE_AUTO_DELETE', false),
|
|
'no_wait' => env('AMQP_QUEUE_NOWAIT', false),
|
|
'arguments' => [],
|
|
'ticket' => env('AMQP_QUEUE_TICKET'),
|
|
],
|
|
|
|
'consumer' => [
|
|
'tag' => env('AMQP_CONSUMER_TAG', ''),
|
|
'no_local' => env('AMQP_CONSUMER_NO_LOCAL', false),
|
|
'no_ack' => env('AMQP_CONSUMER_NO_ACK', false),
|
|
'exclusive' => env('AMQP_CONSUMER_EXCLUSIVE', false),
|
|
'no_wait' => env('AMQP_CONSUMER_NOWAIT', false),
|
|
'arguments' => [],
|
|
'ticket' => env('AMQP_CONSUMER_TICKET'),
|
|
],
|
|
|
|
'qos' => [
|
|
'enabled' => env('AMQP_QOS_ENABLED', false),
|
|
'prefetch_size' => env('AMQP_QOS_PREFETCH_SIZE', 0),
|
|
'prefetch_count' => env('AMQP_QOS_PREFETCH_COUNT', 1),
|
|
'global' => env('AMQP_QOS_GLOBAL', false),
|
|
],
|
|
|
|
/**
|
|
* Default Publish options
|
|
*/
|
|
'publish' => [
|
|
'mandatory' => false,
|
|
'immediate' => false,
|
|
'ticket' => null,
|
|
'batch_count' => 500,
|
|
],
|
|
|
|
/**
|
|
* Default Bind Options
|
|
*/
|
|
'bind' => [
|
|
'no_wait' => false,
|
|
'arguments' => [],
|
|
'ticket' => null,
|
|
],
|
|
|
|
/**
|
|
* Default Consume Options
|
|
*/
|
|
'consume' => [
|
|
'allowed_methods' => null,
|
|
'non_blocking' => false,
|
|
'timeout' => 0,
|
|
],
|
|
],
|
|
],
|
|
];
|