Skip to main content

Enqueue Action

Writes the contents to a Queue

This extension needs to be added to the service:

var builder = System
.AddWorkflow(workflow, malleableAssemblyList)
.AddEnqueueProvider(new RabbitMQEnqueueProviderOptions // Add the RabbitMQ Provider
{
HostName = "localhost",
Port = 5672
RoutingKey = "test-queue",
})
.AddEnqueueAction() // Enables the Enqueue Action
.WithDebugMode()
.Validate()

Then in the workflow you can add a step that writes out to

WriteSuccess:
action: Enqueue
options:
parameters:
queueName: test-queue

Parameters

NameDescriptionRequired
hostNameThe URL for the servertrue
portThe port number for the servicefalse
queueNameThe queue name to write tofalse
exchangeKeyThe exchange key, if not supplied no exchange is createdfalse
routingKeythe routing key to write tofalse
exchangeTypeif the exchangeKey is populated, the type of exchange to create (defaults to fanout)false