KubeMQ
IntegrationsMassTransitReference

Error Codes

The MassTransit.KubeMQ transport exception hierarchy, validation error messages, and the triggers behind connection, timeout, and CQ request failures.

The error reference for the MassTransit.KubeMQ transport: the exception hierarchy, the validation messages thrown at bus startup, and the runtime triggers behind connection, timeout, and CQ request failures. For handling patterns — retries, native DLQ, and the _error / _skipped channels — see the Error Handling & DLQ guide.

Exception hierarchy

All transport exceptions derive from KubeMQTransportException, which itself extends MassTransit's MassTransitException. The base type carries optional Channel and ServerAddress properties for diagnostics, and three subtypes classify the failure. All four live in the MassTransit.KubeMQTransport.Exceptions namespace.

MassTransitException
└── KubeMQTransportException          (Channel, ServerAddress)
    ├── KubeMQTransportConfigurationException
    ├── KubeMQTransportConnectionException
    └── KubeMQTransportTimeoutException
ExceptionThrown when
KubeMQTransportExceptionBase type; general transport errors (e.g. Queue send failed, Query request failed)
KubeMQTransportConfigurationExceptionInvalid configuration or an unsupported operation (e.g. delayed delivery on Events)
KubeMQTransportConnectionExceptionThe connection cannot be established or is lost (Connection closed, gRPC UNAVAILABLE)
KubeMQTransportTimeoutExceptionA send/publish operation exceeds its configured timeout

Validation errors

KubeMQTransportOptions.Validate() runs automatically during bus startup and throws KubeMQTransportConfigurationException with one of these messages for an out-of-range value, so misconfiguration fails fast at boot.

PropertyRuleMessage
HostNon-empty / non-whitespaceHost is invalid: must be non-empty
Port165535Port is invalid: {Port} must be between 1 and 65535
PollTimeoutSeconds13600PollTimeoutSeconds is invalid: {value} must be between 1 and 3600
MaxPollMessages11024MaxPollMessages is invalid: {value} must be between 1 and 1024
ConnectionTimeout> TimeSpan.ZeroConnectionTimeout is invalid: must be positive
ReconnectTimeout> TimeSpan.ZeroReconnectTimeout is invalid: must be positive

You can run the same validation yourself before startup — useful in tests or a configuration smoke check:

ValidationDemo.cs
using MassTransit.KubeMQTransport;
using MassTransit.KubeMQTransport.Exceptions;

try
{
    var options = new KubeMQTransportOptions { Port = 99999 };
    options.Validate();
}
catch (KubeMQTransportConfigurationException ex)
{
    // "Port is invalid: 99999 must be between 1 and 65535"
    Console.WriteLine(ex.Message);
}

Runtime error triggers

ExceptionRepresentative triggers
KubeMQTransportConfigurationExceptionDelayed delivery is not supported for Events. Use Queues. — you attempted to publish (Events or EventsStore) with a delay.
KubeMQTransportConnectionExceptionConnection closed when the client connection cannot be re-established, or a gRPC UNAVAILABLE status from the server.
KubeMQTransportTimeoutExceptionA send or publish operation that exceeds the configured timeout — check network latency and ConnectionTimeout.
KubeMQTransportException (general)Queue send failed: {error}; Query request failed: {error} / Command request failed: {error} when a CQ response comes back with Executed = false.

Query request failed and Command request failed mean the CQ response returned Executed = false — the responder ran and threw, not a timeout. A timeout means no response arrived at all (usually a missing responder or a CQ mode mismatch). See Commands & Queries for telling the two apart.

Fault metadata

When a message is faulted (after all retries are exhausted) and routed to {channel}_error, the transport stores fault metadata as KubeMQ tags. Read them on the error channel to understand what failed.

TagDescription
MT-Fault-ExceptionTypeException type name
MT-Fault-MessageException message
MT-Fault-StackTraceException stack trace
MT-Fault-TimestampWhen the fault occurred
MT-Fault-RetryCountNumber of retry attempts before faulting

See also

Was this page helpful?

On this page