Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: d1de1bafba
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (35 sloc) 1.639 kB
using System;
using System.Messaging;
using Rhino.ServiceBus.Msmq;
namespace Rhino.ServiceBus.Actions
{
public class CreateQueuesAction : IDeploymentAction
{
private readonly IQueueStrategy queueStrategy;
private readonly IServiceBus serviceBus;
public CreateQueuesAction(IQueueStrategy queueStrategy, IServiceBus serviceBus)
{
this.queueStrategy = queueStrategy;
this.serviceBus = serviceBus;
}
public void Execute(string user)
{
// will create the queues if they are not already there
var queues = queueStrategy.InitializeQueue(serviceBus.Endpoint, QueueType.Standard);
foreach (var queue in queues)
{
queue.SetPermissions(user,
MessageQueueAccessRights.DeleteMessage |
MessageQueueAccessRights.DeleteJournalMessage |
MessageQueueAccessRights.GenericRead |
MessageQueueAccessRights.GenericWrite |
MessageQueueAccessRights.GetQueuePermissions |
MessageQueueAccessRights.PeekMessage |
MessageQueueAccessRights.ReceiveJournalMessage |
MessageQueueAccessRights.ReceiveMessage |
MessageQueueAccessRights.WriteMessage,
AccessControlEntryType.Allow);
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.