
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@asyncapi/java-spring-template
Advanced tools
Use your AsyncAPI definition to generate java code to subscribe and publish messages
In order for the generator to know what names to use for some methods it's necessary to make use of AsyncAPI specification extensions. The extension to use is x-service-name and must be applied to all topics.
here is an example of how to use it:
topics:
event.lighting.measured:
x-service-name: measures
publish:
$ref: '#/components/messages/lightMeasured'
subscribe:
$ref: '#/components/messages/lightMeasured'
here is a complete example
asyncapi: '1.0.0'
info:
title: Streetlights API
version: '1.0.0'
description: |
The Smartylighting Streetlights API allows you
to remotely manage the city lights.
license:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0'
baseTopic: smartylighting.streetlights.1.0
servers:
- url: test.mosquitto.org
scheme: mqtt
description: Test broker
variables:
port:
description: Secure connection (TLS) is available through port 8883.
default: '1883'
enum:
- '1883'
- '8883'
topics:
event.lighting.measured:
x-service-name: measures
publish:
$ref: '#/components/messages/lightMeasured'
subscribe:
$ref: '#/components/messages/lightMeasured'
components:
messages:
lightMeasured:
summary: Inform about environmental lighting conditions for a particular streetlight.
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
schemas:
lightMeasuredPayload:
type: object
properties:
lumens:
type: integer
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
sentAt:
type: string
format: date-time
description: Date and time when the message was sent.
Usage: ag [options] <asyncapi> java-spring
Options:
-V, --version output the version number
-t, --templates <templateDir> directory where templates are located (defaults to internal templates directory)
-h, --help output usage information
The shortest possible syntax:
ag asyncapi.yaml java-spring
Specify where to put the result:
ag -o ./src asyncapi.yaml java-spring
{% if asyncapi.servers | schemeExists('amqp') %} Start your RabbitMQ with:
docker-compose -f src/main/docker/rabbitmq.yml up -d
{% endif %}
Go to the root folder of the generated code and run this command (you need the JDK1.8):
./gradlew bootRun
FAQs
Java Spring template for AsyncAPI generator.
The npm package @asyncapi/java-spring-template receives a total of 718 weekly downloads. As such, @asyncapi/java-spring-template popularity was classified as not popular.
We found that @asyncapi/java-spring-template demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.