| Package | Description |
|---|---|
| org.dromara.hutool.extra.mq |
MQ(message queue)(消息队列)门面封装
通过定义统一接口,统一消息中间件的调用,实现消息队列的解耦。 |
| org.dromara.hutool.extra.mq.engine |
消息队列引擎实现
|
| org.dromara.hutool.extra.mq.engine.kafka |
Kafka消息队列引擎
|
| org.dromara.hutool.extra.mq.engine.rabbitmq |
RabbitMQ消息队列引擎
|
| org.dromara.hutool.extra.mq.engine.rocketmq |
RocketMQ引擎
|
| Modifier and Type | Method and Description |
|---|---|
static MQConfig |
MQConfig.of(String brokerUrl)
创建配置
|
MQConfig |
MQConfig.setBrokerUrl(String brokerUrl)
设置Broker地址
|
MQConfig |
MQConfig.setCustomEngine(Class<? extends MQEngine> customEngine)
自定义引擎,当多个jar包引入时,可以自定使用的默认引擎
|
MQConfig |
MQConfig.setProperties(Properties properties)
设置配置
|
| Modifier and Type | Method and Description |
|---|---|
static MQEngine |
MQEngineFactory.createEngine(MQConfig config)
根据用户引入的MQ引擎jar,自动创建对应的模板引擎对象
推荐创建的引擎单例使用,此方法每次调用会返回新的引擎 |
MQEngine |
MQEngine.init(MQConfig config)
初始化配置
|
| Modifier and Type | Method and Description |
|---|---|
KafkaEngine |
KafkaEngine.init(MQConfig config) |
| Constructor and Description |
|---|
KafkaEngine(MQConfig config)
构造
|
| Modifier and Type | Method and Description |
|---|---|
RabbitMQEngine |
RabbitMQEngine.init(MQConfig config) |
| Constructor and Description |
|---|
RabbitMQEngine(MQConfig config)
构造
|
| Modifier and Type | Method and Description |
|---|---|
RocketMQEngine |
RocketMQEngine.init(MQConfig config) |
Copyright © 2025. All rights reserved.