Skip to content

[FEATURE] Introduces new functionality (complete pub/sub pattern) that wasn't fully demonstrated before. #382

Closed

Description

@sujal111

Why do we need this improvement?

It enhances the example to better demonstrate AsyncAPI capabilities through

  1. Multiple message types
  2. Complete publisher/subscriber operations
  3. Proper validation

How will this change help?

  • Provides a complete, real-world example of AsyncAPI's pub/sub pattern
  • Helps new users understand how to structure event-driven APIs
  • Shows proper validation and documentation practices

Screenshots

No response

How could it be implemented/designed?

Implementation Approach

  1. The AsyncAPI template will be implemented by centralizing all user-related events into a single userEvents channel. Instead of creating separate channels per action, this channel will act as the unified event stream for anything related to users. Each event published to this channel will be differentiated by its message type.

Three message types will be implemented on this channel:

UserSignedUp for new user creation

UserUpdated for profile or account changes

UserDeleted for account removal events

2)Each message will have a well-defined payload schema. During implementation, these schemas will enforce required fields, data types, and validation rules, ensuring that every published event follows a strict contract. This allows producers to fail fast if an invalid payload is sent and gives consumers confidence in the data they receive.

3)On the producer side, services will publish events using the publishUserEvent operation. Whenever a user action occurs (signup, update, or deletion), the service will emit the corresponding event to the userEvents channel using the appropriate message schema.

4)On the consumer side, downstream services will subscribe to the same userEvents channel using the subscribeToUserEvents operation. Consumers can then filter or route messages based on the event type (UserSignedUp, UserUpdated, or UserDeleted) and handle each case accordingly.

5)Documentation will be implemented directly within the AsyncAPI spec by adding clear titles, descriptions, and examples for channels, messages, and operations. Components will be organized so schemas and reusable definitions are easy to reference and extend as new user events are added in the future.

Finally, during implementation, YAML syntax issues and validation errors will be addressed to ensure the AsyncAPI file passes schema validation and works seamlessly with AsyncAPI tooling such as generators, validators, and documentation renderers.

🚧 Breaking changes

Yes

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

Activity

  1. github-actions commented on Jan 10, 2026

    @github-actions

    Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
    Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

  2. github-actions commented on May 11, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity 😴

    It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

    There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

    Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

    Thank you for your patience ❤️

  3. Shurtu-gal commented on Aug 17, 2026

    @Shurtu-gal
    Collaborator

    I don't understand how it is connected to .github repo. Please feel free to open it in the requisite repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions