Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Creating queues

Component: NServiceBus
NuGet Package: NServiceBus (8.1)

The scripting guidelines show how to take full control over queue creation:

Declaration

Queues should be declared during the Setup phase of a Feature.

A built-in example is the audit feature, which needs the audit queue. During start-up, NServiceBus ensures the declared queues are present and aborts the start-up procedure if they are not (with the exception of MSMQ remote queues, which are optional).

public class FeatureThatRequiresAQueue :
    Feature
{
    protected override void Setup(FeatureConfigurationContext context)
    {
        var queueBindings = context.Settings.Get<QueueBindings>();
        queueBindings.BindSending("someQueue");
    }
}

Creation

Queues are created only during installation.