public class MqProducerPool extends Object implements org.springframework.context.ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
static Map<String,String> |
producerIds
用来存放topic 对应的真实的生产者ID
|
| Constructor and Description |
|---|
MqProducerPool() |
| Modifier and Type | Method and Description |
|---|---|
com.aliyun.openservices.ons.api.Producer |
getProducer(String topic)
获取生产者
适用场景: 调用方式: 业务逻辑说明 |
Properties |
getPropertyConfigurer()
返回 全局配置文件
|
com.aliyun.openservices.ons.api.Producer |
getSynProducer(String topic)
适用场景: 同步获取生产者,(在第一次创建的时候使用) 调用方式: 业务逻辑说明 |
void |
init() |
boolean |
isNativeOns()
返回 是否开启本地模式
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setCacheService(com.ohaotian.plugin.cache.CacheService cacheService)
设置 缓存service
|
void |
setPropertyConfigurer(Properties propertyConfigurer)
设置 全局配置文件
|
public void setPropertyConfigurer(Properties propertyConfigurer)
propertyConfigurer - 全局配置文件public Properties getPropertyConfigurer()
public boolean isNativeOns()
public void setCacheService(com.ohaotian.plugin.cache.CacheService cacheService)
cacheService - 缓存servicepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void init()
public com.aliyun.openservices.ons.api.Producer getProducer(String topic)
public com.aliyun.openservices.ons.api.Producer getSynProducer(String topic)
topic - Copyright © 2018. All rights reserved.