头图

The article was first published on the official account (Longtai's technical notes), and then synchronized to the personal website: xiaomage.info

Hippo-4J has been a month since the last version 1.2.1. During this period, 170+ commits were submitted by 8 contributors , and version 1.3.0 was officially released.

Note: This is a major upgrade for compatibility with historical versions .

Github : https://github.com/mabaiwan/hippo4j

Gitee : https://gitee.com/mabaiwancn/hippo4j

HIPPO-4J 1.3.0

Feature

  1. Add RabbitMQ thread pool monitoring and dynamic changes
  2. Add RocketMQ thread pool monitoring and dynamic changes
  3. Add Dubbo thread pool monitoring and dynamic changes
  4. Add SpringCloud Stream RocketMQ consumer thread pool monitoring and dynamic changes

Refactor

  1. Refactoring container thread pool query and modification functions
  2. Optimize the data change logic executed after the configuration center triggers the monitoring

Optimize

  1. Front-end console delete useless components
  2. The server page field does not display Chinese
  3. Console UI optimization
  4. Refresh list parameters in real time after modifying thread pool instance
  5. Container thread pool editing is limited to Admin privileges
  6. SpringBoot Starter change package path

BUG

  1. Fix SpringBoot Nacos dynamic refresh does not take effect
  2. Alarm configuration alarm=false Do not configure the notification alarm platform and the receiver to report an error

Three-party framework thread pool adaptation

The biggest feature release of Hippo-4J 1.3.0 is to develop a basic framework that adapts to the tripartite framework .

At present, the thread pool adaptation of Dubbo, RabbitMQ, RocketMQ, RocketMQ Spring CloudStream has been completed, and the thread pool adaptation of frameworks or middleware such as Kafka and Hystrix will be connected in the future.

Introduce the Jar package that adapts to the tripartite framework

After introducing the maven jar coordinates of the Hippo-4J server or core, you also need to introduce the corresponding framework adaptation jar:

 <dependency>
    <groupId>cn.hippo4j</groupId>
    <!-- Dubbo -->
    <artifactId>hippo4j-spring-boot-starter-adapter-dubbo</artifactId>
    <!-- RabbitMQ -->
    <artifactId>hippo4j-spring-boot-starter-adapter-rabbitmq</artifactId>
    <!-- RocketMQ -->
    <artifactId>hippo4j-spring-boot-starter-adapter-rocketmq</artifactId>
    <!-- SpringCloud Stream RocketMQ -->
    <artifactId>hippo4j-spring-boot-starter-adapter-spring-cloud-stream-rocketmq</artifactId>
    <version>1.3.0</version>
</dependency>

If you want to import multiple jar packages, you can only import one full package. The bottom layer of the Hippo-4J framework will determine to load specific thread pool adapters according to the conditions of each middleware.

 <dependency>
    <groupId>cn.hippo4j</groupId>
    <artifactId>hippo4j-spring-boot-starter-adapter-all</artifactId>
    <version>1.3.0</version>
</dependency>

HIPPO-4J Server

After Hippo-4J server introduces the above adaptation jar package, you can view and modify the tripartite framework thread pool in the console of Hippo-4J server.

图1 线程池适配列表

Click Edit to modify the underlying thread pool of the framework corresponding to the Java application.

图2 修改三方线程池

Click the Modify All button to modify the thread pool configuration of all application instances under the current group.

After the modification is successful, the application console prints the following log, that is, the modification is successful.

 [input] RocketMQ consumption thread pool parameter change. coreSize :: 1 => 10, maximumSize :: 1 => 10

HIPPO-4J Core

In addition to relying on the above adaptation Jar package, Hippo-4J core also needs to add the following configuration items in the configuration center.

 spring:
  dynamic:
    thread-pool:
      # 省略其它配置
      adapter-executors:
        # threadPoolKey 代表线程池标识
        - threadPoolKey: 'input'
          # mark 为三方线程池框架类型,参见文初已支持框架集合
          mark: 'RocketMQSpringCloudStream'
          corePoolSize: 10
          maximumPoolSize: 10

Gitee GVP

Hippo-4J has received some valuable accolades for every member who has contributed to Hippo-4J.

图3 GVP 证书

Thanks to all the developers who contributed to Hippo-4J!

https://github.com/mabaiwan/hippo4j/graphs/contributors

图4 Hippo-4J 开发者

final summary

Open source is not easy. If you guys have gained something after reading the Hippo-4J framework, I hope you can help me to click a star on Github and Gitee.

At present, there are 10+ companies using Hippo-4J in the production environment. If your company uses Hippo-4J, please register in the issue below, thank you.

Issue : https://github.com/mabaiwan/hippo4j/issues/13

Registering for use will not have any impact on the company, but only to expand Hippo-4J's influence and help it go further.


马丁玩编程
12 声望6 粉丝