How does the client record the task IDs that have been sent · Issue #909 · a2aproject/a2a-java · GitHub
Skip to content

How does the client record the task IDs that have been sent #909

Open

Description

@Wesley273

There is a scenario where the client initiates event subscription to the server and maintains a long connection through SSE. When the SSE is disconnected due to network fluctuations, the client needs to re-subscribe.

But at this point, how can the client know the task ID of the subscription?

Can it only be achieved by persisting the context ID or the task ID?

What should the best practices be like?

Activity

  1. kabir commented on Jun 3, 2026

    @kabir
    Collaborator

    Hi, yes you would need to do something in the client application to track the task IDs, or perhaps you could list the tasks. But I think listing would mean you need to know the ones you want anyway, which again implies some tracking would be needed

  2. Wesley273 commented on Jun 4, 2026

    @Wesley273
    Author

    Hi, yes you would need to do something in the client application to track the task IDs, or perhaps you could list the tasks. But I think listing would mean you need to know the ones you want anyway, which again implies some tracking would be needed

    It is uncertain whether information other than contextId should be introduced in future protocols to identify clients.

    However, there is another scenario where two pods automatically initiate subscription tasks to the server upon startup.

    In this case, the issue of multiple instances arises, making it difficult to assign a client ID. If each client were to perform leader election, it would be a cumbersome process.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions