Git Product home page Git Product logo

hutch-java's People

Contributors

kenyonduan avatar wppurking avatar wyattpan avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

kenyonduan

hutch-java's Issues

对外暴露 exception 的 hook

类似以下 hutch 的使用:

Hutch::Config.error_handlers << Hutch::ErrorHandlers::MaxRetry.new
Hutch::Config.error_handlers << Hutch::ErrorHandlers::Honeybadger.new

Consumer 级别的 error handler

rescue_from Excon::Error::Forbidden, # 拒绝访问
              Excon::Error::Unauthorized, # 认证失败
              Peddler::Errors::AccessDenied, # 拒接访问
              Peddler::Errors::InvalidAccessKeyId, # 无效的 Developer Account AccessKeyId
              Peddler::Errors::SignatureDoesNotMatch, # 签名验证失败
              with: :recover_channel_handler

Draft: 考虑是否可以更加细颗粒的控制延迟队列,支持一定的积压量

业务场景会遇到有 rate limit 的 api 调用, 当然可以直接交给外部的 rate limit 去处理. 但这样在与 mq 之间沟通的时候, 会浪费大量的计算资源在做重复的事情. 可以将任务分成两种进行考虑:

  1. one shot 类型: 正常让 mq 进行主动推送到 client, 然后进行执行处理既可以. 这里的要求是拥有一定的任务堆积能力, 以及消息处理速度的快慢. 能够方便的根据情况进行 consumer 的增加减少, 能够堆叠 1000w 以内的消息量(再多, 就应该是任务消费的问题了)
  2. delay 类型: 这类现在是简化的利用 mq 的 dlx 进行 retry 重试, 但因为是 push 模型, 所以无法进行主动的任务量获取的控制. 如果需要更加精确的 delay 或者 schedule 类型的任务, 则需要利用新的数据结构或者中间件来解决这个问题.

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.