Rebus是否支持通过HTTP / HTTPS使用MSMQ?

时间:2014-11-20 23:01:20

标签: msmq rebus

我已按以下方式配置订阅:

<add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input" />

但是当总线启动并且发送了订阅时,这就是我得到的:

Exception information: 
    Exception type: HttpException 
    Exception message: An exception occurred while attempting to send Rebus.Messages.SubscriptionMessage to FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input (context: Rebus.Bus.NoTransaction)
   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

An exception occurred while attempting to send Rebus.Messages.SubscriptionMessage to FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input (context: Rebus.Bus.NoTransaction)
   at Rebus.Bus.RebusBus.InternalSend(String destination, Message messageToSend)
   at Rebus.Bus.RebusBus.InternalSend(String destination, List`1 messages)
   at RehabPathway.Infrastructure.MessagingConfig.RegisterHandlers(IContainer container)
   at RehabPathway.Infrastructure.RehabPathwayHttpApplication.Application_Start(Object sender, EventArgs e)

An error occurred while attempting to send Rebus.TransportMessageToSend to FormatName:DIRECT=HTTP://mydomain/msmq/private$\myqueue.input
   at Rebus.Transports.Msmq.MsmqMessageQueue.Send(String destinationQueueName, TransportMessageToSend message, ITransactionContext context)
   at Rebus.Bus.RebusBus.InternalSend(String destination, Message messageToSend)

Invalid queue path name.
   at System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(String queuePath, Boolean throwException)
   at System.Messaging.MessageQueue.get_FormatName()
   at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
   at Rebus.Transports.Msmq.MsmqMessageQueue.Send(String destinationQueueName, TransportMessageToSend message, ITransactionContext context)

我已确认有问题的两台服务器可以通过HTTP / HTTPS在rebus之外发送消息。

1 个答案:

答案 0 :(得分:0)

使用现有的MSMQ传输,Rebus 通过HTTP / HTTPS支持MSMQ。

Rebus将始终使用普通的私有MSMQ队列,并指定如下的队列名称:

 <add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="myqueue.input" />

将邮件映射到本地myqueue.input队列,或

 <add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="myqueue.input@anotherHost" />

将邮件映射到myqueue.input计算机上的anotherHost

如果MSMQ在使用HTTP / HTTPS时满足相同的传送保证,我想没有理由不能以某种方式配置它 - 它现在不支持。