Organization: AsyncAPI AsyncAPI Generator
Contributor: Shuaib Salad
Mentors: Aayush Saini Souvik De
Introduction: This project aims to extend AsyncAPI suite of production ready templates by developing and maintaining a new Java Quarkus (a Kubernetes-native Java stack) template for generating asynchronous applications. The goal is to develop the template within AsyncAPI’s generator monorepo and to have modular components, thereby improving the development and maintenance of templates for the AsyncAPI initiative.
Key Features:
- Template Infrastructure: Scalable Java Quarkus template structure with maven build tool, docker file to to build applications in JVM mode, Kubernetes manifests generation, and package structure. Allowing future templates to be extended easily via components.
- WebSocket Protocol: Allow users to generate WebSocket client microservices based on schema, capable of connecting to dynamic endpoints.
- AsyncAPI V3 Specs: Integrated support for AsyncAPI v3 specifications, enabling generation of event-driven code from AsyncAPI schema.
- API Configuration Test: Verified generated code with acceptance tests using Podman compose and Microcks, helping perform contract testing and validating implementations.
- Kafka Protocol: Enabled users to generate Kafka-based microservices tailored for event architectures, with built-in producer and consumer templates and topic configuration.
| Pull Request | Description | Status | Date |
|---|---|---|---|
| #1623 | chore: initial quarkus websocket solution | 🟪 Merged | August 4, 2025 |
| #1661 | chore: bindings support for java/quarkus websocket via slack example | 🟪 Merged | August 28, 2025 |
| #1706 | chore: acceptance tests using microcks for java/quarkus template | 🟪 Merged | September 04, 2025 |
| #1707 | chore: initial java/quarkus template for kafka protocol | 🟪 Merged | September 15, 2025 |
| Description | Location |
|---|---|
| Quarkus Template Structure | asyncapi/generator: java quarkus |
| Websocket Client & Connector | asyncapi/generator: client.java.js |
| Podman compose Microcks Acceptance Tests | asyncapi/generator: websocket test |
| Kafka Template | asyncapi/generator: java quarkus kafka client |
1. Developing Modular Components & AsyncAPI Schema Parsing: Among the biggest challenges was designing modular components that could dynamically adapt to different AsyncAPI specifications without requiring a complete rewrite for each use case. This required:
- Parsing the AsyncAPI schema to extract operations, message channels, and client names accurately.
- Reusing and extending existing components instead of building new ones from scratch, ensuring consistency across generated templates.
// Extending DependencyProvider.js component with framework and role functionality
function resolveDependencies(language, framework = '', role = '') {
const config = dependenciesConfig[language];
if (!config) {
return [];
}
// Handle flat structure (python, javascript, dart)
if (config.dependencies) {
return config.dependencies;
}
// Handle nested structure (java with quarkus framework and roles)
if (framework && config[framework]) {
const frameworkConfig = config[framework];
if (role && frameworkConfig[role] && frameworkConfig[role].dependencies) {
return frameworkConfig[role].dependencies;
}
if (frameworkConfig.dependencies) {
return frameworkConfig.dependencies;
}
}
return [];
}
2. Endpoint and Topic Configuration: Another challenge was ensuring that generated services connected to the correct endpoints and topics during both development and testing phases. This involved:
- Dynamically configuring WebSocket endpoints and Kafka topics based on specifications variables .
- Debugging configuration issues during Podman-based container testing with Microcks to ensure contract compliance.
- Building a consistent mapping layer to validate the endpoints and topics against the AsyncAPI contract.
export default function AppProperties({ asyncapi, params }) {
const server = getServer(asyncapi.servers(), params.server);
const clientName = getClientName(asyncapi, params.appendClientSuffix, params.customClientName);
const serverHost = getServerHost(server);
const serverProtocol = getServerProtocol(server);
const protocol = `${serverProtocol}://`;
return (
<File name="application.properties">
<Text>
{`# application.properties
# Define a named base-uri for ${clientName}
com.asyncapi.${clientName}.base-uri=${protocol}${serverHost}`}
</Text>
</File>
);
}
The next steps for this project are to:
- Support overall template maintenance within Generator monorepo.
- Add more modular Kafka components and test with real-world event-streaming scenarios.
- Generate Kubernetes CRDs from AsyncAPI specs for easier service deployment and updates.
Huge thank you to Aayush Saini and Lukasz Gornicki for supporting me throughout this journey. I learned a lot from my mentors and the Generator community. I gained skills in event-driven architectures (EDAs), messaging systems like WebSocket and Kafka, schema definitions, JavaScript and Java development, API configuration and testing, and Docker + Kubernetes setups for. Overall I enjoyed every step of the way and hope others contribute as well. Thanks to AsyncAPI & GSOC for the amazing program!