StellaOps.Workflow.Transport.RabbitMq

RabbitMQ transport of the workflow engine: the rabbit kind publishes JSON to an exchange and routing key with publisher confirms, and with a command declaration frames the call as an envelope or a header and waits for the correlated reply.

library
Component
Workflow
Licence
BUSL-1.1 (Workflow licence)
Target framework
net10.0
Latest release
1.0.1-20261118T121708Z

Install

dotnet add package StellaOps.Workflow.Transport.RabbitMq --version 1.0.1-20261118T121708Z

Namespaces

NamespaceTypes
StellaOps.Workflow.Transport.RabbitMq5

namespace StellaOps.Workflow.Transport.RabbitMq

TypeKindDescription
RabbitMqWorkflowTransportRoutineclassDependency-injection routine of the RabbitMQ transport.
WorkflowRabbitReplyQueueModeenumHow replies to command-style calls reach this host.
WorkflowRabbitTlsOptionsclassTLS settings of the broker connection.
WorkflowRabbitTransportOptionsclassSettings of the RabbitMQ transport, bound from WorkflowRabbitTransportOptions.SectionName.
WorkflowRabbitTransportServiceCollectionExtensionsclassRegisters the RabbitMQ transport of the Workflow engine.

class RabbitMqWorkflowTransportRoutine

public sealed class RabbitMqWorkflowTransportRoutine : IDependencyInjectionRoutine

Dependency-injection routine of the RabbitMQ transport. A host that loads this assembly as a plug-in discovers the routine; it registers exactly what WorkflowRabbitTransportServiceCollectionExtensions.AddWorkflowRabbitTransport(IServiceCollection, IConfiguration)registers.

Members

MemberKindSummary
RabbitMqWorkflowTransportRoutine()constructorCreates an instance of RabbitMqWorkflowTransportRoutine.
Register(IServiceCollection, IConfiguration)methodRegisters what WorkflowRabbitTransportServiceCollectionExtensions.AddWorkflowRabbitTransport(IServiceCollection, IConfiguration)registers.

constructor RabbitMqWorkflowTransportRoutine() #

public RabbitMqWorkflowTransportRoutine()

Creates an instance of RabbitMqWorkflowTransportRoutine.

method Register(IServiceCollection, IConfiguration) #

public IServiceCollection Register(IServiceCollection services, IConfiguration configuration)

Registers what WorkflowRabbitTransportServiceCollectionExtensions.AddWorkflowRabbitTransport(IServiceCollection, IConfiguration)registers.

Parameters

  • services: The service collection.
  • configuration: The host configuration.

Returns

The same service collection.

enum WorkflowRabbitReplyQueueMode

public enum WorkflowRabbitReplyQueueMode

How replies to command-style calls reach this host.

ValueDescription
DirectReplyTo = 0The broker’s direct reply-to pseudo-queue, consumed on the publishing channel.
ExclusiveQueue = 1One server-named, exclusive, auto-delete reply queue per host, consumed for the life of the connection.

class WorkflowRabbitTlsOptions

public sealed class WorkflowRabbitTlsOptions

TLS settings of the broker connection.

Members

MemberKindSummary
WorkflowRabbitTlsOptions()constructorCreates an instance of WorkflowRabbitTlsOptions.
ClientCertificatePassphrasepropertyThe passphrase of WorkflowRabbitTlsOptions.ClientCertificatePath, from the operator’s configuration source.
ClientCertificatePathpropertyA client certificate file for mutual TLS, if the broker asks for one.
EnabledpropertySwitches TLS on for the broker connection.
ServerNamepropertyThe name the broker certificate must carry; when empty, WorkflowRabbitTransportOptions.HostName.

constructor WorkflowRabbitTlsOptions() #

public WorkflowRabbitTlsOptions()

Creates an instance of WorkflowRabbitTlsOptions.

property ClientCertificatePassphrase #

public string? ClientCertificatePassphrase { get; set; }

The passphrase of WorkflowRabbitTlsOptions.ClientCertificatePath, from the operator’s configuration source.

property ClientCertificatePath #

public string? ClientCertificatePath { get; set; }

A client certificate file for mutual TLS, if the broker asks for one.

property Enabled #

public bool Enabled { get; set; }

Switches TLS on for the broker connection. Default off.

property ServerName #

public string? ServerName { get; set; }

The name the broker certificate must carry; when empty, WorkflowRabbitTransportOptions.HostName.

class WorkflowRabbitTransportOptions

public sealed class WorkflowRabbitTransportOptions

Settings of the RabbitMQ transport, bound from WorkflowRabbitTransportOptions.SectionName. The broker address has no default: a call is refused until WorkflowRabbitTransportOptions.HostNameis set. The header and field names that frame a command-style call are configuration, so a host can match the message format its peers expect.

Members

MemberKindSummary
WorkflowRabbitTransportOptions()constructorCreates an instance of WorkflowRabbitTransportOptions.
SectionNameconstantThe configuration section the options bind from: WorkflowRabbitTransport.
ChannelPoolSizepropertyThe most idle publishing channels the transport keeps open.
ClientProvidedNamepropertyThe connection name the broker shows for this host.
CommandHeaderNamepropertyHeader framing: the message header that carries the command name.
ConfirmTimeoutSecondspropertySeconds to wait for the broker’s publisher confirm.
EnvelopeCommandFieldpropertyEnvelope framing: the envelope field that carries the command name.
EnvelopeCorrelationIdFieldpropertyEnvelope framing: the envelope field that carries the correlation id.
EnvelopePayloadFieldpropertyEnvelope framing: the envelope field that carries the payload.
HostNamepropertyThe broker host.
PasswordpropertyThe password; when empty, the client library’s default applies.
PortpropertyThe broker port.
ReplyErrorFieldpropertyEnvelope framing: the reply envelope field whose non-empty value marks a failed call.
ReplyErrorHeaderNamepropertyHeader framing: the reply header whose non-empty value marks a failed call.
ReplyPayloadFieldpropertyEnvelope framing: the reply envelope field that carries the reply payload.
ReplyQueueModepropertyHow replies reach this host: the broker’s direct reply-to (default) or one exclusive reply queue per host.
ReplyTimeoutSecondspropertySeconds to wait for the correlated reply of a command that expects one.
TlspropertyTLS to the broker; off unless WorkflowRabbitTlsOptions.Enabledis set.
UserNamepropertyThe user name; when empty, the client library’s default applies.
VirtualHostpropertyThe broker virtual host.

constructor WorkflowRabbitTransportOptions() #

public WorkflowRabbitTransportOptions()

Creates an instance of WorkflowRabbitTransportOptions.

constant SectionName #

public const string SectionName = "WorkflowRabbitTransport"

The configuration section the options bind from: WorkflowRabbitTransport.

property ChannelPoolSize #

public int ChannelPoolSize { get; set; }

The most idle publishing channels the transport keeps open.

property ClientProvidedName #

public string ClientProvidedName { get; set; }

The connection name the broker shows for this host.

property CommandHeaderName #

public string CommandHeaderName { get; set; }

Header framing: the message header that carries the command name.

property ConfirmTimeoutSeconds #

public int? ConfirmTimeoutSeconds { get; set; }

Seconds to wait for the broker’s publisher confirm. When null, the engine’s transport default applies.

property EnvelopeCommandField #

public string EnvelopeCommandField { get; set; }

Envelope framing: the envelope field that carries the command name.

property EnvelopeCorrelationIdField #

public string EnvelopeCorrelationIdField { get; set; }

Envelope framing: the envelope field that carries the correlation id.

property EnvelopePayloadField #

public string EnvelopePayloadField { get; set; }

Envelope framing: the envelope field that carries the payload.

property HostName #

public string? HostName { get; set; }

The broker host. Required: a call without it is refused and opens no connection.

property Password #

public string? Password { get; set; }

The password; when empty, the client library’s default applies.

property Port #

public int Port { get; set; }

The broker port. The default is 5672.

property ReplyErrorField #

public string ReplyErrorField { get; set; }

Envelope framing: the reply envelope field whose non-empty value marks a failed call.

property ReplyErrorHeaderName #

public string ReplyErrorHeaderName { get; set; }

Header framing: the reply header whose non-empty value marks a failed call.

property ReplyPayloadField #

public string ReplyPayloadField { get; set; }

Envelope framing: the reply envelope field that carries the reply payload.

property ReplyQueueMode #

public WorkflowRabbitReplyQueueMode ReplyQueueMode { get; set; }

How replies reach this host: the broker’s direct reply-to (default) or one exclusive reply queue per host.

property ReplyTimeoutSeconds #

public int? ReplyTimeoutSeconds { get; set; }

Seconds to wait for the correlated reply of a command that expects one. When null, the engine’s transport default applies.

property Tls #

public WorkflowRabbitTlsOptions Tls { get; set; }

TLS to the broker; off unless WorkflowRabbitTlsOptions.Enabledis set.

property UserName #

public string? UserName { get; set; }

The user name; when empty, the client library’s default applies.

property VirtualHost #

public string VirtualHost { get; set; }

The broker virtual host. The default is /.

class WorkflowRabbitTransportServiceCollectionExtensions

public static class WorkflowRabbitTransportServiceCollectionExtensions

Registers the RabbitMQ transport of the Workflow engine.

Members

MemberKindSummary
AddWorkflowRabbitTransport(IServiceCollection, IConfiguration)extension methodRegisters the RabbitMQ transport as the IWorkflowRabbitTransport(module transport.rabbit), with one broker connection per host, from the WorkflowRabbitTransport configuration section.

extension method AddWorkflowRabbitTransport(IServiceCollection, IConfiguration) #

public static IServiceCollection AddWorkflowRabbitTransport(this IServiceCollection services, IConfiguration configuration)

Registers the RabbitMQ transport as the IWorkflowRabbitTransport(module transport.rabbit), with one broker connection per host, from the WorkflowRabbitTransport configuration section.