Connect FastBee
Less than 1 minute
Overview
This page is the English counterpart of the Chinese Connect FastBee guide. It summarizes cluster edition operation, deployment, integration, and high-availability maintenance while keeping the document path aligned with the Chinese documentation structure.
How To Use This Page
- Follow the same operation order as the Chinese source page.
- Keep configuration values, topic names, ports, commands, and file paths consistent with your deployment environment.
- Screenshots and diagrams reuse the Chinese documentation image directory so assets are maintained in one place.
- For production changes, validate the operation in a test environment before applying it online.
Reference Commands And Configuration
The following snippets are preserved from the source guide because commands, configuration keys, and protocol examples should remain exact.
kafka:
bootstrap-servers: localhost:9092 # kafka 服务器集群地址,默认为 localhost:9092
template:
default-topic: property_post #将消息发送到的默认主题,KafkaTemplate.sendDefault
listener:
type: batch @KafkaListener(topics = KafkaConstant.FMQ_PROPERTY_POST, groupId = KafkaConstant.FMQ_PROPERTY_POST_GROUP,
containerFactory = "propertyPostFactory", batch = "true")
public void propertyPostListen(String data) {
try {
//此处省略
} catch (Exception e) {
}
} public Promise<Void> transmit(ProducerVO vo) {
final Promise<Void> promise = defaultEventExecutorGroup.next().newPromise();
try {
String key = vo.getKey();
String jKey = key != null ? key : "default";
ProducerRecord<String,Object> record;
if (Objects.isNull(key)){
record = new ProducerRecord<>(vo.getTopic(), vo.getData());
}else {
record = new ProducerRecord<>(vo.getTopic(),jKey, vo.getData());
}
producer.send(record,(data ,e) -> {
if (e!= null){
promise.setFailure(e);
}else {
promise.setSuccess(null);
}
});
}catch (Exception e){
}
return promise;
}