yangys
2024-03-28 25475f31cd0d52ff328bbea9e80f15647dedd80b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.qianwen.smartman.modules.notify.message.rocket;
 
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import com.qianwen.core.notify.NotifierProvidersMapManager;
import com.qianwen.core.notify.NotifyResultProducer;
import com.qianwen.core.notify.executor.NotifyQueueExecutorProvider;
import com.qianwen.core.notify.executor.NotifyTaskExecutorProvider;
import com.qianwen.core.notify.notifier.NotifierManager;
import com.qianwen.core.notify.notifier.NotifyConfigManager;
import com.qianwen.smartman.modules.notify.manager.DefaultNotifierManager;
import com.qianwen.smartman.modules.notify.message.rocket.consumer.NotifyHistoryConsumer;
import com.qianwen.smartman.modules.notify.message.rocket.consumer.NotifyQueueExecuteConsumer;
import com.qianwen.smartman.modules.notify.message.rocket.consumer.NotifyTaskExecuteConsumer;
import com.qianwen.smartman.modules.notify.message.rocket.producer.RocketNotifyQueueProducer;
import com.qianwen.smartman.modules.notify.message.rocket.producer.RocketNotifyResultProducer;
import com.qianwen.smartman.modules.notify.service.INotifyHistoryService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
@ConditionalOnClass({RocketMQTemplate.class})
@ConditionalOnProperty(prefix = "blade.task", name = {"distributor"}, havingValue = "rocket", matchIfMissing = true)
@Configuration(proxyBeanMethods = false)
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/message/rocket/RocketTaskConfiguration.class */
public class RocketTaskConfiguration {
    @ConditionalOnBean({NotifyTaskExecutorProvider.class})
    @Bean
    public NotifyTaskExecuteConsumer notifyTaskExecuteConsumer(NotifyTaskExecutorProvider notifyTaskExecutorProvider) {
        return new NotifyTaskExecuteConsumer(notifyTaskExecutorProvider);
    }
 
    @ConditionalOnBean({NotifyQueueExecutorProvider.class})
    @Bean
    public NotifyQueueExecuteConsumer notifyQueueExecuteConsumer(NotifyQueueExecutorProvider notifyQueueExecutorProvider) {
        return new NotifyQueueExecuteConsumer(notifyQueueExecutorProvider);
    }
 
    @ConditionalOnBean({INotifyHistoryService.class})
    @Bean
    public NotifyHistoryConsumer notifyHistoryConsumer(INotifyHistoryService notifyHistoryService) {
        return new NotifyHistoryConsumer(notifyHistoryService);
    }
 
    @Bean
    public RocketNotifyQueueProducer notifyQueueProducer(RocketMQTemplate rocketMQTemplate) {
        return new RocketNotifyQueueProducer(rocketMQTemplate);
    }
 
    @Bean
    public RocketNotifyResultProducer notifyResultProducer(RocketMQTemplate rocketMQTemplate) {
        return new RocketNotifyResultProducer(rocketMQTemplate);
    }
 
    @Bean
    public NotifierManager defaultNotifierManager(NotifyResultProducer notifyResultProducer, NotifyConfigManager configManager, NotifierProvidersMapManager notifierProvidersMapManager) {
        return new DefaultNotifierManager(notifyResultProducer, notifierProvidersMapManager, configManager);
    }
}