Skip to content

AsyncAPI v3: support multiple messages #140

Closed

Description

@lerenn

For now, only the first message of the operation or channel is supported, others are discarded.

All messages should be supported by multiple send and receive function (one per message). It will require to listen to a channel and separate depending of the message.

Activity

  1. changed the title [-]AsyncAPI v3: Support multiple messages[/-] [+]AsyncAPI v3: support multiple messages[/+] on Mar 1, 2024
  2. lerenn commented on Jun 12, 2026

    @lerenn
    OwnerAuthor

    PR #332 implements the send side: when an operation (or its channel) declares more than one message, a dedicated SendAs<Op>For<Message> function is generated for each, so every message can now be sent (previously only the first was usable). It also fixes a latent non-determinism in Channel.GetMessage that could produce unstable/non-compiling code for multi-message channels.

    The receive side is not yet covered and this issue stays open to track it. The chosen per-message API (SubscribeToXForA / SubscribeToXForB) collides with the controller's address-keyed subscription map (one subscription per channel address, with an "already subscribed" guard), so it needs a rework of subscription management plus the agreed try-each-until-valid message discrimination. The subscribe side currently still handles the first message only.

  3. lerenn commented on Jun 12, 2026

    @lerenn
    OwnerAuthor

    The send side shipped in #332: when an operation (or its channel) declares more than one message, a SendAs<Op>For<Message> function is now generated for each, so every message can be sent (previously only the first was usable). It also fixed a latent non-determinism in Channel.GetMessage.

    The remaining receive side is tracked in #333 (per-message subscribe functions + try-each-until-valid discrimination + the subscription-map rework it requires). Closing this issue in favor of that focused follow-up.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions