FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Is it possible to support consuming an event stream that includes comments? · Issue #443 · modelcontextprotocol/java-sdk · GitHub

Repository navigation

Is it possible to support consuming an event stream that includes comments? #443

Description

Expected Behavior

Handle comments in event stream. Do nothing when there is a comment line.

Current Behavior

Throw McpError in ResponseSubscribers class

Log:

McpError: Invalid SSE response. Status code: 200 Line: : keep-alive

Context

I have an MCP server that periodically sends heartbeat packets to the MCP client (using comments way, refer to event_stream_format). In theory, the client should ignore these comments. However, starting from version 0.11.0 and in the main branch, an else branch was added in the ResponseSubscribers class, which causes the client to throw an exception upon receiving comments.

Can we add an else-if branch to skip processing when line.startsWith(":") to support consuming an event stream that includes comments?

Activity

  1. tzolov commented on Aug 7, 2025

    Contributor

    Good pont @rwang-parasoft
    We will add comment handling and back-port it to 0.11.2

  2. self-assigned this
    on Aug 7, 2025
  3. added this to the 0.12.0 milestone on Aug 7, 2025
  4. rwang-parasoft commented on Aug 7, 2025

    Author

    @tzolov Thanks for you reply :).

  5. added a commit that references this issue on Aug 7, 2025
    e9d04af
  6. added 2 commits that reference this issue on Aug 7, 2025
    4532b61
    d756be1
  7. added a commit that references this issue on Jun 25, 2026
    7f007e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL