org.redkalex.mq.kafka.KafkaMessageAgentProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redkale-plugins Show documentation
Show all versions of redkale-plugins Show documentation
Redkale-Plugins -- java framework
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.redkalex.mq.kafka;
import org.redkale.annotation.Priority;
import org.redkale.mq.spi.MessageAgent;
import org.redkale.mq.spi.MessageAgentProvider;
import org.redkale.util.*;
/** @author zhangjx */
@Priority(-800)
public class KafkaMessageAgentProvider implements MessageAgentProvider {
@Override
public boolean acceptsConf(AnyValue config) {
try {
Object.class.isAssignableFrom(org.apache.kafka.clients.CommonClientConfigs.class); // 试图加载相关类
return new KafkaMessageAgent().acceptsConf(config);
} catch (Throwable t) {
return false;
}
}
@Override
public MessageAgent createInstance() {
return new KafkaMessageAgent();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy