Method RemoveEndpointAsync
RemoveEndpointAsync(string, CancellationToken)
Removes an endpoint by name, draining and disposing it.
ValueTask RemoveEndpointAsync(string name, CancellationToken cancellationToken = default)
Parameters
namestringName of the endpoint to remove.
cancellationTokenCancellationTokenA CancellationToken used to bound the drain operation's PING/PONG fence
Returns
Remarks
The endpoint stops receiving new messages, then any messages it has already received are handled before it is disposed. Other endpoints on this service are unaffected.
An endpoint is named by the name it was added with. An endpoint added without a
name takes its name from its subject with dots replaced by dashes, and for an endpoint
added through a NatsSvcServer.Group that subject includes the group prefix.
So on a group g1, an endpoint added as name: "e1" is removed as e1,
but one added as subject: "s1" with no name is removed as g1-s1.