* !44 comment
* !39 添加下行日志打印
* !36 扩展计价领域模型
* !35 webui 初步成型
* !34 webui 初步成型
This commit is contained in:
三丙
2025-09-09 08:23:59 +00:00
parent 921045af8f
commit 58580ca11e
372 changed files with 37900 additions and 1206 deletions

View File

@@ -107,7 +107,7 @@ public abstract class AbstractQueueConsumerTemplate<R, T extends QueueMsg> imple
}
} catch (IOException e) {
log.error("Failed decode record: [{}]", record);
throw new RuntimeException("Failed to decode record: ", e);
throw new RuntimeException("解码记录失败: ", e);
}
});
return result;

View File

@@ -9,7 +9,7 @@ package sanbing.jcpp.infrastructure.queue.common;
import static sanbing.jcpp.infrastructure.util.trace.TracerContextUtil.*;
/**
* @author baigod
* @author 九筒
*/
public final class QueueConstants {

View File

@@ -24,7 +24,7 @@ import java.util.List;
/**
* @author baigod
* @author 九筒
*/
@Component
@Slf4j

View File

@@ -27,7 +27,7 @@ import static sanbing.jcpp.infrastructure.util.JCPPHashUtil.forName;
import static sanbing.jcpp.infrastructure.util.JCPPHashUtil.hash;
/**
* @author baigod
* @author 九筒
*/
@Component
@Slf4j
@@ -74,7 +74,7 @@ public class HashPartitionProvider implements PartitionProvider {
private TopicPartitionInfo resolve(QueueKey queueKey, int hash) {
Integer partitionSize = partitionSizesMap.get(queueKey);
if (partitionSize == null) {
throw new IllegalStateException("Partitions info for queue " + queueKey + " is missing");
throw new IllegalStateException("队列 " + queueKey + " 的分区信息缺失");
}
int partition = Math.abs(hash % partitionSize);

View File

@@ -10,7 +10,7 @@ package sanbing.jcpp.infrastructure.queue.discovery;
import sanbing.jcpp.proto.gen.ClusterProto;
/**
* @author baigod
* @author 九筒
*/
public interface ServiceInfoProvider {
String getServiceId();

View File

@@ -22,7 +22,7 @@ public abstract class JCPPApplicationEventListener<T extends JCPPApplicationEven
@Override
public void onApplicationEvent(T event) {
if (!filterApplicationEvent(event)) {
if (!filterApplicationEvent()) {
log.trace("Skipping event due to filter: {}", event);
return;
}
@@ -49,7 +49,7 @@ public abstract class JCPPApplicationEventListener<T extends JCPPApplicationEven
protected abstract void onJCPPApplicationEvent(T event);
protected boolean filterApplicationEvent(T event) {
protected boolean filterApplicationEvent() {
return true;
}

View File

@@ -23,7 +23,7 @@ import static sanbing.jcpp.infrastructure.queue.discovery.QueueKey.MAIN_QUEUE_NA
public class PartitionChangeEvent extends JCPPApplicationEvent {
@Serial
private static final long serialVersionUID = -8731788167026510559L;
private static final long serialVersionUID = 1L;
@Getter
private final Map<QueueKey, Set<TopicPartitionInfo>> partitionsMap;

View File

@@ -60,12 +60,12 @@ public class KafkaAdmin implements QueueAdmin {
}
case null, default -> {
log.warn("[{}] Failed to create topic", topic, ee);
throw new RuntimeException(ee);
throw new RuntimeException("Kafka管理操作失败", ee);
}
}
} catch (Exception e) {
log.warn("[{}] Failed to create topic", topic, e);
throw new RuntimeException(e);
throw new RuntimeException("Kafka操作失败", e);
}
}