Skip to content

[Task]: Improve subscribe and sendMessage contract from the Client API #526

@jmesnil

Description

@jmesnil

What happened?

The javadoc of AbstractClient#resubscribe(TaskIdParams) says:

This is only available if both the client and server support streaming.
The configured client consumers will be used to handle messages, tasks,
and update events received from the remote agent.

However its implementation uses null for the consumers:

resubscribeToTask(request, null, null, context);

It goes back to use the client's consumer later in the code path but that makes the API confusing.
The API should use the correct consumers and streamingErrorHandler as soon as possible in the code
to improve the API and make sure we can reliably document when parameters can be null or not.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions