Constructor NatsSvcEndpoint
NatsSvcEndpoint(INatsConnection, string?, string, Func<NatsSvcMsg<T>, ValueTask>, string, IDictionary<string, string>?, INatsDeserialize<T>, NatsSubOpts?, CancellationToken)
Creates a new instance of NatsSvcEndpoint<T>.
public NatsSvcEndpoint(INatsConnection nats, string? queueGroup, string name, Func<NatsSvcMsg<T>, ValueTask> handler, string subject, IDictionary<string, string>? metadata, INatsDeserialize<T> serializer, NatsSubOpts? opts, CancellationToken cancellationToken)
Parameters
natsINatsConnectionNATS connection.
queueGroupstringQueue group.
namestringOptional endpoint name.
handlerFunc<NatsSvcMsg<T>, ValueTask>Callback function to handle messages received.
subjectstringOptional subject name.
metadataIDictionary<string, string>Endpoint metadata.
serializerINatsDeserialize<T>Serializer to use for the message type.
optsNatsSubOptsSubscription options.
cancellationTokenCancellationTokenA CancellationToken used to cancel the API call.