StellaOps.Router.Transport.Messaging

Router Messaging transport, client side: connects a microservice to a gateway through the request and response queues of a Messaging backend.

library
Component
Router
Licence
Apache-2.0
Target framework
net10.0
Latest release
1.0.1-20261117T070237Z

Install

dotnet add package StellaOps.Router.Transport.Messaging --version 1.0.1-20261117T070237Z

Namespaces

NamespaceTypes
StellaOps.Router.Transport.Messaging3
StellaOps.Router.Transport.Messaging.Extensions1
StellaOps.Router.Transport.Messaging.Options1
StellaOps.Router.Transport.Messaging.Protocol4

namespace StellaOps.Router.Transport.Messaging

TypeKindDescription
MessagingTransportClientclassTransport client that communicates with the gateway via StellaOps.Messaging.
MessagingTransportPluginclassPlugin for the client side of the Messaging transport, which a microservice connects with.
MessagingTransportServiceCollectionExtensionsclassExtension methods for registering the client side of the messaging transport and the options both sides read.

class MessagingTransportClient

public sealed class MessagingTransportClient : ITransportClient, IMicroserviceTransport, IDisposable

Transport client that communicates with the gateway via StellaOps.Messaging. Implements both ITransportClient (for sending to microservices) and IMicroserviceTransport (for microservices connecting to gateway).

Members

MemberKindSummary
MessagingTransportClient(IMessageQueueFactory, IOptions<MessagingTransportOptions>, ILogger<MessagingTransportClient>, IFrameEnvelopeSigner, IFrameEnvelopeVerifier, TimeProvider)constructorInitializes a new instance of the MessagingTransportClientclass.
OnCancelReceivedeventEvent raised when a CANCEL frame is received from the gateway.
OnRequestReceivedeventEvent raised when a REQUEST frame is received from the gateway.
OnResyncRequestedeventEvent raised when the router explicitly requests a fresh endpoint metadata replay.
TransportDiedeventRaised when the messaging transport connection is permanently lost.
ConnectAsync(InstanceDescriptor, IReadOnlyList<EndpointDescriptor>, CancellationToken)methodConnects to the router and registers the microservice.
ConnectAsync(InstanceDescriptor, IReadOnlyList<EndpointDescriptor>, IReadOnlyDictionary<string, SchemaDefinition>, ServiceOpenApiInfo, CancellationToken)methodConnects to the router and registers the microservice, including schemas and OpenAPI metadata.
DisconnectAsync()methodDisconnects from the router.
Dispose()methodSee IDisposable.Dispose().
SendCancelAsync(ConnectionState, Guid, string)methodSends a cancellation request.
SendEndpointsUpdateAsync(IReadOnlyList<EndpointDescriptor>, IReadOnlyDictionary<string, SchemaDefinition>, ServiceOpenApiInfo, CancellationToken)methodSends the current endpoint/schema/OpenAPI metadata after the router explicitly requests a replay.
SendGoodbyeAsync(CancellationToken)methodSends a best-effort Goodbye control frame before shutdown.
SendHeartbeatAsync(HeartbeatPayload, CancellationToken)methodSends a heartbeat to the router.
SendRequestAsync(ConnectionState, Frame, TimeSpan, CancellationToken)methodSends a request and waits for a response.
SendStreamingAsync(ConnectionState, Frame, Stream, Func<ResponseFrame, Stream, Task>, PayloadLimits, CancellationToken)methodSends a request whose body is read from a stream and hands the microservice’s response to readResponse.

constructor MessagingTransportClient(IMessageQueueFactory, IOptions<MessagingTransportOptions>, ILogger<MessagingTransportClient>, IFrameEnvelopeSigner, IFrameEnvelopeVerifier, TimeProvider) #

public MessagingTransportClient(IMessageQueueFactory queueFactory, IOptions<MessagingTransportOptions> options, ILogger<MessagingTransportClient> logger, IFrameEnvelopeSigner? envelopeSigner = null, IFrameEnvelopeVerifier? envelopeVerifier = null, TimeProvider? timeProvider = null)

Initializes a new instance of the MessagingTransportClientclass.

event OnCancelReceived #

public event Func<Guid, string?, Task>? OnCancelReceived

Event raised when a CANCEL frame is received from the gateway.

event OnRequestReceived #

public event Func<Frame, CancellationToken, Task<Frame>>? OnRequestReceived

Event raised when a REQUEST frame is received from the gateway.

event OnResyncRequested #

public event Func<RegistrationResyncRequestPayload, CancellationToken, Task>? OnResyncRequested

Event raised when the router explicitly requests a fresh endpoint metadata replay.

event TransportDied #

public event Action? TransportDied

Raised when the messaging transport connection is permanently lost. The microservice’s router connection manager listens for this event and reconnects.

method ConnectAsync(InstanceDescriptor, IReadOnlyList<EndpointDescriptor>, CancellationToken) #

public Task ConnectAsync(InstanceDescriptor instance, IReadOnlyList<EndpointDescriptor> endpoints, CancellationToken cancellationToken)

Connects to the router and registers the microservice.

Parameters

  • instance: The instance descriptor.
  • endpoints: The endpoints to register.
  • cancellationToken: Cancellation token.

method ConnectAsync(InstanceDescriptor, IReadOnlyList<EndpointDescriptor>, IReadOnlyDictionary<string, SchemaDefinition>, ServiceOpenApiInfo, CancellationToken) #

public Task ConnectAsync(InstanceDescriptor instance, IReadOnlyList<EndpointDescriptor> endpoints, IReadOnlyDictionary<string, SchemaDefinition>? schemas, ServiceOpenApiInfo? openApiInfo, CancellationToken cancellationToken)

Connects to the router and registers the microservice, including schemas and OpenAPI metadata.

Parameters

  • instance: The instance descriptor.
  • endpoints: The endpoints to register.
  • schemas: Optional schema definitions keyed by schema id.
  • openApiInfo: Optional OpenAPI service metadata.
  • cancellationToken: Cancellation token.

method DisconnectAsync() #

public Task DisconnectAsync()

Disconnects from the router.

method Dispose() #

public void Dispose()

See IDisposable.Dispose().

method SendCancelAsync(ConnectionState, Guid, string) #

public Task SendCancelAsync(ConnectionState connection, Guid correlationId, string? reason = null)

Sends a cancellation request.

Parameters

  • connection: The connection to use.
  • correlationId: The correlation ID of the request to cancel.
  • reason: Optional reason for cancellation.

Remarks

The signed per-connection control lane is the only cancellation path. A target that does not advertise RouterTransportCapabilities.MessagingCancelControlV1receives no cancellation; there is no fallback path.

method SendEndpointsUpdateAsync(IReadOnlyList<EndpointDescriptor>, IReadOnlyDictionary<string, SchemaDefinition>, ServiceOpenApiInfo, CancellationToken) #

public Task SendEndpointsUpdateAsync(IReadOnlyList<EndpointDescriptor> endpoints, IReadOnlyDictionary<string, SchemaDefinition>? schemas, ServiceOpenApiInfo? openApiInfo, CancellationToken cancellationToken)

Sends the current endpoint/schema/OpenAPI metadata after the router explicitly requests a replay.

method SendGoodbyeAsync(CancellationToken) #

public Task SendGoodbyeAsync(CancellationToken cancellationToken)

Sends a best-effort Goodbye control frame before shutdown. Transports that do not maintain a live microservice connection may no-op.

Parameters

  • cancellationToken: Cancellation token.

method SendHeartbeatAsync(HeartbeatPayload, CancellationToken) #

public Task SendHeartbeatAsync(HeartbeatPayload heartbeat, CancellationToken cancellationToken)

Sends a heartbeat to the router.

Parameters

  • heartbeat: The heartbeat payload.
  • cancellationToken: Cancellation token.

method SendRequestAsync(ConnectionState, Frame, TimeSpan, CancellationToken) #

public Task<Frame> SendRequestAsync(ConnectionState connection, Frame requestFrame, TimeSpan timeout, CancellationToken cancellationToken)

Sends a request and waits for a response.

Parameters

  • connection: The connection to use.
  • requestFrame: The request frame.
  • timeout: The timeout for the request.
  • cancellationToken: Cancellation token.

Returns

The response frame.

method SendStreamingAsync(ConnectionState, Frame, Stream, Func<ResponseFrame, Stream, Task>, PayloadLimits, CancellationToken) #

public Task SendStreamingAsync(ConnectionState connection, Frame requestHeader, Stream requestBody, Func<ResponseFrame, Stream, Task> readResponse, PayloadLimits limits, CancellationToken cancellationToken)

Sends a request whose body is read from a stream and hands the microservice’s response to readResponse. TransportStreamingDispatch.SendBufferedAsync(ITransportClient, ConnectionState, Frame, Stream, Func<ResponseFrame, Stream, Task>, PayloadLimits, CancellationToken)implements it for transports whose microservice side answers a request with one response frame.

Parameters

  • connection: The connection to use.
  • requestHeader: The request header frame.
  • requestBody: The request body stream.
  • readResponse: Callback that receives the response head (the status code and headers of the microservice’s response; its ResponseFrame.Payloadis empty) and the response body stream.
  • limits: Payload limits to enforce.
  • cancellationToken: Cancellation token.

Remarks

Sends the request body in one request frame (TransportStreamingDispatch.SendBufferedAsync(ITransportClient, ConnectionState, Frame, Stream, Func<ResponseFrame, Stream, Task>, PayloadLimits, CancellationToken)).

class MessagingTransportPlugin

public sealed class MessagingTransportPlugin : IRouterTransportPlugin

Plugin for the client side of the Messaging transport, which a microservice connects with. The server side is MessagingTransportServerPlugin in StellaOps.Router.Transport.Messaging.Server; both carry the transport name messaging.

Members

MemberKindSummary
MessagingTransportPlugin()constructorCreates an instance of MessagingTransportPlugin.
DisplayNamepropertyGets the human-readable display name for this transport.
ModepropertyGets the side of the transport this plugin registers: RouterTransportMode.Client, RouterTransportMode.Server, or RouterTransportMode.Both.
TransportNamepropertyGets the transport name (e.g., “tcp”, “tls”, “udp”, “rabbitmq”, “inmemory”, “messaging”), shared by the client and the server plugin of one transport.
Register(RouterTransportRegistrationContext)methodRegisters transport services into the DI container for the side the context asks for.
RegisterShared(RouterTransportRegistrationContext)methodThe registration both sides share: frame envelope protection, the Messaging backend named at <section>:transport and the validated MessagingTransportOptionsbinding of the context’s section.

constructor MessagingTransportPlugin() #

public MessagingTransportPlugin()

Creates an instance of MessagingTransportPlugin.

property DisplayName #

public string DisplayName { get; }

Gets the human-readable display name for this transport.

property Mode #

public RouterTransportMode Mode { get; }

Gets the side of the transport this plugin registers: RouterTransportMode.Client, RouterTransportMode.Server, or RouterTransportMode.Both. IRouterTransportPlugin.Register(RouterTransportRegistrationContext)refuses a context that asks for a side outside this value (RouterTransportRegistrationContext.EnsureSupportedBy(IRouterTransportPlugin)).

property TransportName #

public string TransportName { get; }

Gets the transport name (e.g., “tcp”, “tls”, “udp”, “rabbitmq”, “inmemory”, “messaging”), shared by the client and the server plugin of one transport.

method Register(RouterTransportRegistrationContext) #

public void Register(RouterTransportRegistrationContext context)

Registers transport services into the DI container for the side the context asks for.

Parameters

  • context: The registration context containing services, configuration, and transport mode.

Exceptions

  • InvalidOperationException: The context asks for a side this plugin does not provide.

method RegisterShared(RouterTransportRegistrationContext) #

public static void RegisterShared(RouterTransportRegistrationContext context)

The registration both sides share: frame envelope protection, the Messaging backend named at <section>:transport and the validated MessagingTransportOptionsbinding of the context’s section.

Parameters

  • context: The registration context of the plugin.

class MessagingTransportServiceCollectionExtensions

public static class MessagingTransportServiceCollectionExtensions

Extension methods for registering the client side of the messaging transport and the options both sides read. The server side is AddMessagingTransportServer in StellaOps.Router.Transport.Messaging.Server.

Members

MemberKindSummary
AddMessagingTransportClient(IServiceCollection, Action<MessagingTransportOptions>)extension methodAdds the messaging transport client only (for Microservice SDK).
AddMessagingTransportOptions(IServiceCollection, Action<MessagingTransportOptions>)extension methodRegisters the validated MessagingTransportOptionsboth sides of the transport read, validated when the host starts.

extension method AddMessagingTransportClient(IServiceCollection, Action<MessagingTransportOptions>) #

public static IServiceCollection AddMessagingTransportClient(this IServiceCollection services, Action<MessagingTransportOptions>? configure = null)

Adds the messaging transport client only (for Microservice SDK). Requires StellaOps.Messaging services to be registered.

Parameters

  • services: The service collection.
  • configure: Optional configuration action.

Returns

The service collection for chaining.

extension method AddMessagingTransportOptions(IServiceCollection, Action<MessagingTransportOptions>) #

public static IServiceCollection AddMessagingTransportOptions(this IServiceCollection services, Action<MessagingTransportOptions>? configure = null)

Registers the validated MessagingTransportOptionsboth sides of the transport read, validated when the host starts.

Parameters

  • services: The service collection.
  • configure: Optional configuration action.

Returns

The service collection for chaining.

namespace StellaOps.Router.Transport.Messaging.Extensions

TypeKindDescription
QueueWaitExtensionsclassExtension to efficiently await new messages on a queue.

class QueueWaitExtensions

public static class QueueWaitExtensions

Extension to efficiently await new messages on a queue. Uses INotifiableQueue Pub/Sub wakeup when available, falls back to a delay for non-notifiable queue implementations.

Remarks

For Valkey queues the actual timeout is controlled by ValkeyTransportOptions.QueueWaitTimeoutSeconds (default 5s, 0 = pure event-driven). The timeout parameter passed here is used only as a hint for the queue implementation. Both sides of the Messaging transport wait with it.

Members

MemberKindSummary
WaitForMessagesAsync<TMessage>(IMessageQueue<TMessage>, CancellationToken)extension methodWaits for new messages to become available on the queue, with no timeout hint.
WaitForMessagesAsync<TMessage>(IMessageQueue<TMessage>, TimeSpan, CancellationToken)extension methodWaits for new messages to become available on the queue.

extension method WaitForMessagesAsync<TMessage>(IMessageQueue<TMessage>, CancellationToken) #

public static Task WaitForMessagesAsync<TMessage>(this IMessageQueue<TMessage> queue, CancellationToken cancellationToken) where TMessage : class

Waits for new messages to become available on the queue, with no timeout hint.

extension method WaitForMessagesAsync<TMessage>(IMessageQueue<TMessage>, TimeSpan, CancellationToken) #

public static Task WaitForMessagesAsync<TMessage>(this IMessageQueue<TMessage> queue, TimeSpan heartbeatInterval, CancellationToken cancellationToken) where TMessage : class

Waits for new messages to become available on the queue.

namespace StellaOps.Router.Transport.Messaging.Options

TypeKindDescription
MessagingTransportOptionsclassConfiguration options for the messaging-based router transport.

class MessagingTransportOptions

public class MessagingTransportOptions

Configuration options for the messaging-based router transport.

Members

MemberKindSummary
MessagingTransportOptions()constructorCreates an instance of MessagingTransportOptions.
BatchSizepropertyGets or sets the batch size for leasing messages.
CancelControlApproximateMaxLengthpropertyGets or sets the approximate maximum number of entries retained in one connection-specific cancellation control stream.
CancelControlBatchSizepropertyGets or sets the batch size for leasing dedicated cancellation controls.
CancelControlQueueTemplatepropertyGets or sets the queue template for the connection-specific cancellation control lane.
CancelTombstoneTtlpropertyGets or sets how long an exact-correlation cancellation remains active when it overtakes the corresponding request on the independent lane.
ConsumerGrouppropertyGets or sets the consumer group name for request processing.
DeadLetterSuffixpropertyGets or sets the dead letter queue suffix.
GatewayControlQueueServiceNamepropertyGets or sets the logical queue segment reserved for gateway control traffic (HELLO, HEARTBEAT, and microservice-to-gateway responses).
HeartbeatIntervalpropertyGets or sets the heartbeat interval.
LeaseDurationpropertyGets or sets the lease duration for message processing.
MaxConcurrentRequestspropertyGets or sets the maximum number of messages processed concurrently per consumer loop iteration.
MaxPendingCancellationspropertyGets or sets the maximum number of expiring pre-cancel correlations held by one messaging client.
RequestQueueTemplatepropertyGets or sets the queue name template for incoming requests.
RequestTimeoutpropertyGets or sets how long a consumer loop waits for the handler of one queue message before it stops awaiting it and releases the message for retry.
ResponseQueueNamepropertyGets or sets the queue name for gateway responses.
GetCancelControlQueueName(string, string)methodGets the cancellation control queue for one logical service connection.
GetGatewayControlQueueName()methodGets the queue name used for gateway control traffic.
GetRequestQueueName(string)methodGets the request queue name for a specific service.

constructor MessagingTransportOptions() #

public MessagingTransportOptions()

Creates an instance of MessagingTransportOptions.

property BatchSize #

public int BatchSize { get; set; }

Gets or sets the batch size for leasing messages.

property CancelControlApproximateMaxLength #

public int CancelControlApproximateMaxLength { get; set; }

Gets or sets the approximate maximum number of entries retained in one connection-specific cancellation control stream.

property CancelControlBatchSize #

public int CancelControlBatchSize { get; set; }

Gets or sets the batch size for leasing dedicated cancellation controls. This is independent from normal request and response leasing so a burst of abandoned requests can be cancelled in one control-loop wake.

property CancelControlQueueTemplate #

public string CancelControlQueueTemplate { get; set; }

Gets or sets the queue template for the connection-specific cancellation control lane. Both {service} and {connection} placeholders are required.

property CancelTombstoneTtl #

public TimeSpan CancelTombstoneTtl { get; set; }

Gets or sets how long an exact-correlation cancellation remains active when it overtakes the corresponding request on the independent lane. Must be at least MessagingTransportOptions.RequestTimeout.

property ConsumerGroup #

public string ConsumerGroup { get; set; }

Gets or sets the consumer group name for request processing.

property DeadLetterSuffix #

public string DeadLetterSuffix { get; set; }

Gets or sets the dead letter queue suffix.

property GatewayControlQueueServiceName #

public string GatewayControlQueueServiceName { get; set; }

Gets or sets the logical queue segment reserved for gateway control traffic (HELLO, HEARTBEAT, and microservice-to-gateway responses).

Remarks

This must not overlap with any real microservice name. The default avoids collision with the “gateway” service.

property HeartbeatInterval #

public TimeSpan HeartbeatInterval { get; set; }

Gets or sets the heartbeat interval. Default: 45 seconds.

property LeaseDuration #

public TimeSpan LeaseDuration { get; set; }

Gets or sets the lease duration for message processing.

property MaxConcurrentRequests #

public int MaxConcurrentRequests { get; set; }

Gets or sets the maximum number of messages processed concurrently per consumer loop iteration. Prevents head-of-line blocking where one slow handler blocks all other messages in the batch. Default: 10 (matches BatchSize).

property MaxPendingCancellations #

public int MaxPendingCancellations { get; set; }

Gets or sets the maximum number of expiring pre-cancel correlations held by one messaging client.

property RequestQueueTemplate #

public string RequestQueueTemplate { get; set; }

Gets or sets the queue name template for incoming requests. Use {service} placeholder for service-specific queues. Example: “router:requests:{service}”

property RequestTimeout #

public TimeSpan RequestTimeout { get; set; }

Gets or sets how long a consumer loop waits for the handler of one queue message before it stops awaiting it and releases the message for retry. A request from the gateway is the exception: the service runs it until the request’s own timeout (the TimeoutSeconds of the request frame) and never releases it for a second run; this value applies to a request only when its frame carries no timeout.

property ResponseQueueName #

public string ResponseQueueName { get; set; }

Gets or sets the queue name for gateway responses. Example: “router:responses”

method GetCancelControlQueueName(string, string) #

public string GetCancelControlQueueName(string serviceName, string connectionId)

Gets the cancellation control queue for one logical service connection.

method GetGatewayControlQueueName() #

public string GetGatewayControlQueueName()

Gets the queue name used for gateway control traffic.

method GetRequestQueueName(string) #

public string GetRequestQueueName(string serviceName)

Gets the request queue name for a specific service.

namespace StellaOps.Router.Transport.Messaging.Protocol

TypeKindDescription
CancelControlPayloadrecordAuthenticated target binding carried by a dedicated cancellation-control frame: the JSON payload one side of the Messaging transport writes and the other reads.
CorrelationTrackerclassTracks pending request/response correlations for RPC-style messaging.
RpcRequestMessagerecordRepresents an RPC request message sent via the messaging transport.
RpcResponseMessagerecordRepresents an RPC response message sent via the messaging transport.

record CancelControlPayload

public sealed record CancelControlPayload

Authenticated target binding carried by a dedicated cancellation-control frame: the JSON payload one side of the Messaging transport writes and the other reads.

Members

MemberKindSummary
CancelControlPayload()constructorCreates an instance of CancelControlPayload.
OriginalPayloadBase64propertyThe payload of the original CANCEL frame, Base64-encoded.
TargetConnectionIdpropertyThe connection identifier the cancellation is addressed to.
TargetServicepropertyThe service name the cancellation is addressed to.

constructor CancelControlPayload() #

public CancelControlPayload()

Creates an instance of CancelControlPayload.

property OriginalPayloadBase64 #

public required string OriginalPayloadBase64 { get; init; }

The payload of the original CANCEL frame, Base64-encoded.

property TargetConnectionId #

public required string TargetConnectionId { get; init; }

The connection identifier the cancellation is addressed to.

property TargetService #

public required string TargetService { get; init; }

The service name the cancellation is addressed to.

class CorrelationTracker

public sealed class CorrelationTracker : IDisposable

Tracks pending request/response correlations for RPC-style messaging.

Members

MemberKindSummary
CorrelationTracker(TimeProvider)constructorInitializes a new instance of the CorrelationTrackerclass.
PendingCountpropertyGets the number of pending requests.
Dispose()methodSee IDisposable.Dispose().
RegisterRequestAsync(string, TimeSpan, CancellationToken)methodRegisters a pending request and returns a task that completes when the response arrives.
TryCancelRequest(string)methodCancels a pending request.
TryCompleteRequest(string, Frame)methodCompletes a pending request with the given response.
TryFailRequest(string, Exception)methodFails a pending request with an exception.

constructor CorrelationTracker(TimeProvider) #

public CorrelationTracker(TimeProvider? timeProvider = null)

Initializes a new instance of the CorrelationTrackerclass.

property PendingCount #

public int PendingCount { get; }

Gets the number of pending requests.

method Dispose() #

public void Dispose()

See IDisposable.Dispose().

method RegisterRequestAsync(string, TimeSpan, CancellationToken) #

public Task<Frame> RegisterRequestAsync(string correlationId, TimeSpan timeout, CancellationToken cancellationToken)

Registers a pending request and returns a task that completes when the response arrives.

method TryCancelRequest(string) #

public bool TryCancelRequest(string correlationId)

Cancels a pending request.

method TryCompleteRequest(string, Frame) #

public bool TryCompleteRequest(string correlationId, Frame response)

Completes a pending request with the given response.

method TryFailRequest(string, Exception) #

public bool TryFailRequest(string correlationId, Exception exception)

Fails a pending request with an exception.

record RpcRequestMessage

public sealed record RpcRequestMessage

Represents an RPC request message sent via the messaging transport.

Members

MemberKindSummary
RpcRequestMessage()constructorCreates an instance of RpcRequestMessage.
ConnectionIdpropertyGets the connection ID of the sender.
CorrelationIdpropertyGets the correlation ID for matching requests to responses.
CreatedAtpropertyGets the timestamp when this request was created.
EnvelopeSealpropertyGets the gateway-issued envelope HMAC seal attached to the frame.
FrameTypepropertyGets the frame type.
PayloadBase64propertyGets the frame payload as base64-encoded bytes.
ReplyToQueuepropertyGets the reply-to queue name for responses.
SenderInstanceIdpropertyGets the instance ID of the sender.
TargetServicepropertyGets the target service name.
TimeoutpropertyGets the timeout for this request.

constructor RpcRequestMessage() #

public RpcRequestMessage()

Creates an instance of RpcRequestMessage.

property ConnectionId #

public required string ConnectionId { get; init; }

Gets the connection ID of the sender.

property CorrelationId #

public required string CorrelationId { get; init; }

Gets the correlation ID for matching requests to responses.

property CreatedAt #

public DateTimeOffset CreatedAt { get; init; }

Gets the timestamp when this request was created.

property EnvelopeSeal #

public FrameEnvelopeSeal? EnvelopeSeal { get; init; }

Gets the gateway-issued envelope HMAC seal attached to the frame.

Remarks

Messaging transports must carry the envelope seal alongside the payload so that MessagingTransportServer (StellaOps.Router.Transport.Messaging.Server) can verify before dispatch and dead-letter forged frames with reason envelope-invalid.

property FrameType #

public required FrameType FrameType { get; init; }

Gets the frame type.

property PayloadBase64 #

public required string PayloadBase64 { get; init; }

Gets the frame payload as base64-encoded bytes.

property ReplyToQueue #

public string? ReplyToQueue { get; init; }

Gets the reply-to queue name for responses.

property SenderInstanceId #

public string? SenderInstanceId { get; init; }

Gets the instance ID of the sender.

property TargetService #

public required string TargetService { get; init; }

Gets the target service name.

property Timeout #

public TimeSpan? Timeout { get; init; }

Gets the timeout for this request.

record RpcResponseMessage

public sealed record RpcResponseMessage

Represents an RPC response message sent via the messaging transport.

Members

MemberKindSummary
RpcResponseMessage()constructorCreates an instance of RpcResponseMessage.
ConnectionIdpropertyGets the connection ID of the responder.
CorrelationIdpropertyGets the correlation ID matching the original request.
CreatedAtpropertyGets the timestamp when this response was created.
EnvelopeSealpropertyGets the gateway-issued envelope HMAC seal attached to the frame.
ErrorMessagepropertyGets the error message if the request failed.
FrameTypepropertyGets the frame type.
IsSuccesspropertyGets a value indicating whether the request was successful.
PayloadBase64propertyGets the frame payload as base64-encoded bytes.
ResponderInstanceIdpropertyGets the instance ID of the responder.

constructor RpcResponseMessage() #

public RpcResponseMessage()

Creates an instance of RpcResponseMessage.

property ConnectionId #

public required string ConnectionId { get; init; }

Gets the connection ID of the responder.

property CorrelationId #

public required string CorrelationId { get; init; }

Gets the correlation ID matching the original request.

property CreatedAt #

public DateTimeOffset CreatedAt { get; init; }

Gets the timestamp when this response was created.

property EnvelopeSeal #

public FrameEnvelopeSeal? EnvelopeSeal { get; init; }

Gets the gateway-issued envelope HMAC seal attached to the frame.

Remarks

Response messages carry the seal computed by the responding microservice’s signer so the gateway can verify before forwarding the response to the caller.

property ErrorMessage #

public string? ErrorMessage { get; init; }

Gets the error message if the request failed.

property FrameType #

public required FrameType FrameType { get; init; }

Gets the frame type.

property IsSuccess #

public bool IsSuccess { get; init; }

Gets a value indicating whether the request was successful.

property PayloadBase64 #

public required string PayloadBase64 { get; init; }

Gets the frame payload as base64-encoded bytes.

property ResponderInstanceId #

public string? ResponderInstanceId { get; init; }

Gets the instance ID of the responder.