fhteam/xenforo-amqp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fhteam/xenforo-amqp

Composer 安装命令:

composer require fhteam/xenforo-amqp

包简介

AMQP library for using in XenForo addons

README 文档

README

AMQP client library for XenForo to use servers like RabbitMQ from XenForo

Installation

Please do note, that package name has changed to fhteam/xenforo-amqp. Old name should still work though it will no longer be maintained.

Library follows PSR4 so installation is a bit different from what we can see in all XenForo addons

So, to use this library you can directly include the script into your source or do the following:

Configuration

Put the following lines at the end of your library/config.php:

//============ AMQP connector settings ============
$config['amqp'] = array(
    'host' => '192.168.1.1.1',          // The host where your AMPQ-compatible server runs
    'port' => '5672',                   // Port, your server runs on
    'user' => 'user',                   // Authentication user name 
    'password' => 'password',           // Authentication password
    'queues' => array(                  // Queues configuration
        'auth_ban' => array(            // The name of the queue
            'queue_flags' => array(     // Queue flags.
                'durable' => true,      // 'durable' means the queue will survice server reboot
            ), 
        ),
    ),
);

Usage:

  • Create manager instance:
$manager = new \Forumhouse\XenForoAmqp\QueueManager();
  • Push a message to queue:
$manager->pushMessage(
    'my_queue_name',                // The name of the queue. Must be in configuration file (see above)
    array('data' => 'test_data'),   // The data to send to the queue. Will be json_encode'd if array is provided
    array('delivery_mode' => 2)     // Message properties. 'delivery_mode' => 2 makes message persistent
);

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-03-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固