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.

PackageStellaOps.Workflow.Transport.RabbitMq
ComponentWorkflow
LicenceBUSL-1.1 (Workflow licence)
Package kindLibrary
Target frameworknet10.0

To add the package to a project, see Installing Stella Ops packages.

Namespaces

NamespaceTypes
StellaOps.Workflow.Transport.RabbitMq5

StellaOps.Workflow.Transport.RabbitMq namespace

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.

RabbitMqWorkflowTransportRoutine class

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.

RabbitMqWorkflowTransportRoutine() constructor

public RabbitMqWorkflowTransportRoutine()

Creates an instance of RabbitMqWorkflowTransportRoutine.

Register(IServiceCollection, IConfiguration) method

public IServiceCollection Register(IServiceCollection services, IConfiguration configuration)

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

Parameters

Returns

The same service collection.

WorkflowRabbitReplyQueueMode enum

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.

WorkflowRabbitTlsOptions class

public sealed class WorkflowRabbitTlsOptions

TLS settings of the broker connection.

WorkflowRabbitTlsOptions() constructor

public WorkflowRabbitTlsOptions()

Creates an instance of WorkflowRabbitTlsOptions.

ClientCertificatePassphrase property

public string? ClientCertificatePassphrase { get; set; }

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

ClientCertificatePath property

public string? ClientCertificatePath { get; set; }

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

Enabled property

public bool Enabled { get; set; }

Switches TLS on for the broker connection. Default off.

ServerName property

public string? ServerName { get; set; }

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

WorkflowRabbitTransportOptions class

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.

WorkflowRabbitTransportOptions() constructor

public WorkflowRabbitTransportOptions()

Creates an instance of WorkflowRabbitTransportOptions.

SectionName constant

public const string SectionName = "WorkflowRabbitTransport"

The configuration section the options bind from: WorkflowRabbitTransport.

ChannelPoolSize property

public int ChannelPoolSize { get; set; }

The most idle publishing channels the transport keeps open.

ClientProvidedName property

public string ClientProvidedName { get; set; }

The connection name the broker shows for this host.

CommandHeaderName property

public string CommandHeaderName { get; set; }

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

ConfirmTimeoutSeconds property

public int? ConfirmTimeoutSeconds { get; set; }

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

EnvelopeCommandField property

public string EnvelopeCommandField { get; set; }

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

EnvelopeCorrelationIdField property

public string EnvelopeCorrelationIdField { get; set; }

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

EnvelopePayloadField property

public string EnvelopePayloadField { get; set; }

Envelope framing: the envelope field that carries the payload.

HostName property

public string? HostName { get; set; }

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

Password property

public string? Password { get; set; }

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

Port property

public int Port { get; set; }

The broker port. The default is 5672.

ReplyErrorField property

public string ReplyErrorField { get; set; }

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

ReplyErrorHeaderName property

public string ReplyErrorHeaderName { get; set; }

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

ReplyPayloadField property

public string ReplyPayloadField { get; set; }

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

ReplyQueueMode property

public WorkflowRabbitReplyQueueMode ReplyQueueMode { get; set; }

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

ReplyTimeoutSeconds property

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.

Tls property

public WorkflowRabbitTlsOptions Tls { get; set; }

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

UserName property

public string? UserName { get; set; }

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

VirtualHost property

public string VirtualHost { get; set; }

The broker virtual host. The default is /.

WorkflowRabbitTransportServiceCollectionExtensions class

public static class WorkflowRabbitTransportServiceCollectionExtensions

Registers the RabbitMQ transport of the Workflow engine.

AddWorkflowRabbitTransport(IServiceCollection, IConfiguration) extension method

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.