GithubHelp home page GithubHelp logo

amqp-retry's Introduction

component-creater

功能

  • 该组件主要是在amqp组件的基础上做扩展,可以对rabbitmq队列进行自动重试,还可以手动重试;

下载安装包

composer require eric-strive/amqp-retry

同步配置

php bin/hyperf.php vendor:publish eric-strive/amqp-retry
  • 根剧自己的要求修改配置
retry_times 自动重试次数 
retry_times_interval 每次重试间隔时间基数 间隔时间=times*retry_times_interval
比如retry_times_interval设置的100 第二次重试时间隔的时间就是2*100 200秒

新建数据表

php bin/hyperf.php migrate

重试脚本执行

php bin/hyperf.php amqp:retry exchange routing_key
exchange 交换器 可不填 不填就会重试所有状态为error和terminated
routing_key 路由键名称
  • 注意
config/autoload/amqp.php 配置文件中将 close_on_destruct 改为 false ;执行重试脚本时会报错

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.