Giter Club home page Giter Club logo

Comments (2)

Snailclimb avatar Snailclimb commented on July 2, 2024 1

Guide 哥好,自荐下我开源的动态线程池框架:hippo4j

推荐项目

  • 类别:Java

  • 亮点:

    • 多种模式 - 支持基于配置中心的轻量级依赖,以及自带控制台的无依赖中间件版本。
    • 全局管控 - 通过 hippo4j 管理应用中的线程池,避免胡乱定义线程池,造成项目资源浪费。
    • 动态变更 - 应用运行时动态变更线程池参数,并支持某一个实例变更。
    • 通知报警 - 内置四种报警通知策略,线程池活跃度、容量水位、拒绝策略以及任务执行时间超长。
    • 运行监控 - 实时查看线程池运行时数据,以及最近半小时线程池运行数据图表展示。
    • 中间件适配 - Alibaba Dubbo、RocketMQ、RabbitMQ、SpringCloud Hystrix、Tomcat 等线程池运行时数据查看和线程数变更。
  • 示例代码:

定义动态线程池:

@Bean
@DynamicThreadPool
public Executor sendMessageConsumeDynamicThreadPool() {
    String threadPoolId = "send-message-consume";
    ThreadPoolExecutor sendMessageConsume = ThreadPoolBuilder.builder()
            .threadPoolId(threadPoolId)
            .threadFactory(threadPoolId)
            .dynamicPool()
            .build();
    return sendMessageConsume;
}

使用动态线程池:

@Resource
private Executor sendMessageConsumeDynamicThreadPool;
  • 截图:

  • 后续更新计划:

    • 线程池参数动态变更时,判断当前容器 CPU 占比,过高则提示操作者是否继续修改。
    • 线程池参数动态变更时,加入审核机制;变更后将该配置持久化,方便配置回滚。
    • 控制台和报警通知加入国际化支持。
    • 支持 H2 数据库,通过 Docker 快速部署服务,不需要依赖其它数据库。
    • 支持 Dubbo EagerThreadPoolExecutor 线程池模型。
    • 支持 Etcd、Consul 配置中心动态调整参数。

感谢大佬自荐!会尽快添加进去。

from awesome-java.

jerriliu avatar jerriliu commented on July 2, 2024

from awesome-java.

Related Issues (20)

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.