提供 Quarkus 3.x 与 Camel 的后端架构模式与实现指导,支持事件驱动开发。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "quarkus-patterns" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/docs/tr/skills/quarkus-patterns/SKILL.md 2. 保存为 ~/.claude/skills/quarkus-patterns/SKILL.md 3. 装好后重载技能,告诉我可以用了
请基于 Quarkus 3.x LTS 和 Camel,设计一个事件驱动的订单后端架构,包含 REST API、消息消费与发布、CDI 服务拆分、Panache 数据访问层,以及异步处理流程,并给出推荐的项目结构与关键代码示例。
输出完整的后端架构方案、模块划分说明、核心代码骨架与消息流设计建议。
请为一个用户管理服务生成 Quarkus 3.x 代码模板,包括 RESTful API 设计、DTO、CDI 业务服务、Panache 实体与仓储、异常处理,以及基础测试样例,要求代码风格清晰并适合生产项目扩展。
输出可落地的接口与数据层代码模板,并附带测试与扩展建议。
我有一个基于 Quarkus 和 Camel 的异步消息处理服务,请帮我审查常见架构模式,优化消费者并发、失败重试、死信队列、事务边界和可观测性方案,并给出改进后的实现建议。
输出针对异步处理链路的优化建议、风险点分析和改进实现方案。
Apache Camel ile bulut-native, event-driven servisler için Quarkus 3.x mimari ve API desenleri.
Quarkus servislerinde Resource -> service -> repository akışını CDI scope'ları,
@Transactional sınırları, Panache/Hibernate veri erişimi ve Camel/RabbitMQ
entegrasyonlarıyla birlikte uygulayın. Aşağıdaki örnekler event üretimi,
dosya işleme, özel logging context ve async yayınlama için kopyalanabilir
başlangıç noktaları sağlar.
@Slf4j
@ApplicationScoped
@RequiredArgsConstructor
public class As2ProcessingService {
private final InvoiceFlowValidator invoiceFlowValidator;
private final EventService eventService;
private final DocumentJobService documentJobService;
private final BusinessRulesPublisher businessRulesPublisher;
private final FileStorageService fileStorageService;
public void processFile(Path filePath) throws Exception {
LogContext logContext = CustomLog.getCurrentContext();
try (SafeAutoCloseable ignored = CustomLog.startScope(logContext)) {
String structureIdPartner = logContext.get(As2Constants.STRUCTURE_ID);
// Koşullu akış mantığı
boolean isChorusFlow = Boolean.parseBoolean(logContext.get(As2Constants.CHORUS_FLOW));
log.info("Is CHORUS_FLOW message: {}", isChorusFlow);
ValidationFlowConfig validationFlowConfig = isChorusFlow
? ValidationFlowConfig.xsdOnly()
: ValidationFlowConfig.allValidations();
InvoiceValidationResult invoiceValidationResult = this.invoiceFlowValidator
.validateFlowWithConfig(filePath, validationFlowConfig,
EInvoiceSyntaxFormat.UBL, logContext);
FlowProfile flowProfile = isChorusFlow ?
FlowProfile.EXTENDED_CTC_FR :
this.invoiceFlowValidator.computeFlowProfile(invoiceValidationResult,
invoiceValidationResult.getInvoiceDetails().invoiceFormat().getProfile());
log.info("Invoice validation completed. Message is valid");
// CompletableFuture async işlemi
try(InputStream inputStream = Files.newInputStream(filePath)) {
CompletableFuture<StoredDocumentInfo> documentInfoCompletableFuture =
fileStorageService.uploadOriginalFile(inputStream,
invoiceValidationResult.getSize(), logContext,
invoiceValidationResult.getInvoiceFormat());
StoredDocumentInfo documentInfo = documentInfoCompletableFuture.join();
log.info("File uploaded successfully: {}", documentInfo.getPath());
if (StringUtils.isBlank(documentInfo.getPath())) {
String errorMsg = "File path is empty after upload";
log.error(errorMsg);
this.eventService.createErrorEvent(documentInfo, "FILE_UPLOAD_FAILED", errorMsg);
throw new As2ServerProcessingException(errorMsg);
}
this.eventService.createSuccessEvent(documentInfo, "PERSISTENCE_BLOB_EVENT_TYPE");
String originalFileName = documentInfo.getOriginalFileName();
…
帮助开发者为代码代理配置性能优化、安全防护与研究优先工作流。
提供数据库迁移、回滚与零停机发布的最佳实践指导,适用于多种 ORM 与 SQL 数据库。
通过双评审智能体对结果进行对抗式校验,提升输出发布前的可靠性
帮助你掌握地道 Rust 模式、所有权与并发实践,编写安全高性能应用。
基于 C++ Core Guidelines 编写、审查并重构更安全现代的 C++ 代码。
为 Claude Code 会话提供系统化校验流程,帮助检查结果正确性与质量。
帮助你设计 Quarkus 3 后端架构模式,覆盖消息、REST、数据访问与异步处理。
为 Quarkus 3.x 项目提供测试驱动开发方案,支持功能开发、修复与重构。
帮助开发者为 Quarkus 3.x 服务实施测试驱动开发、修复缺陷并安全重构。
帮助开发者用 Quarkus 3.x 实践测试驱动开发与重构验证。
帮助开发者理解并生成 Quarkus 项目常见模式、结构与实践建议。
帮助你规划与实现 Spring Boot 后端架构、接口与常用工程模式。