Class NatsSvcEndpoint<T>
NATS service endpoint.
public class NatsSvcEndpoint<T> : NatsSvcEndpointBase, INatsSvcEndpoint, IAsyncDisposable
Type Parameters
T
Serialized type to use when receiving data.
- Inheritance
-
NatsSvcEndpoint<T>
- Implements
- Inherited Members
Constructors
- NatsSvcEndpoint(INatsConnection, string?, string, Func<NatsSvcMsg<T>, ValueTask>, string, IDictionary<string, string>?, INatsDeserialize<T>, NatsSubOpts?, CancellationToken)
Creates a new instance of NatsSvcEndpoint<T>.
Properties
- AverageProcessingTime
Average processing time in nanoseconds.
- Errors
Number of errors.
- LastError
Last error message.
- Metadata
Endpoint metadata.
- Name
The name of the endpoint.
- ProcessingTime
Total processing time in nanoseconds.
- Requests
Number of requests received.
Methods
- DisposeAsync()
Disposes the instance asynchronously.
- ReceiveInternalAsync(string, string?, ReadOnlySequence<byte>?, ReadOnlySequence<byte>)
Invoked when a MSG or HMSG arrives for the subscription.
This method is invoked while reading from the socket. Buffers belong to the socket reader and you should process them as quickly as possible or create a copy before you return from this method.
- TryComplete()
Invoked to signal end of the subscription.