开发者

NServiceBus with SQL Server Message Transport

Is there any 开发者_开发知识库way to use SQL Server as physical message transport instead of using built in MSMQ message transport with NServiceBus ?

Thanks


SQL Server contains built-in messaging in form of Service Broker. This gives you a vary efficient, high-speed, high-throughput, asynchronous and reliable messaging transport between SQL Server instances. The fact that is only targeting SQL instances is not as bad as it sounds, considering that SQL Server Express support Service Broker and I know deployments that use tens, hundreds of Express, instances geo-distributed, to exchange messages with central higher edition SQL instances.

The major problem is lack of a C#/.Net API, there is no support for WCF channels, nor NServiceBus. There are various projects trying to address this, with more or less success. Ultimately it will depend on what is the driving factor for the decision: integration with an existing messaging bus like NServiceBus, or raw performance and reliability at the cost of depending on sQL Server proprietary bus.


Sorry for answering such an old topic, but there is a .Net message bus project using SQL server as a message transport: NGinn.MessageBus (at http://code.google.com/p/nginn-messagebus/ ). It's my pet open source project created specifically for applications that are already using SQL Server. The project is mature enough to be used in production. More information can be found at the project website.


In NServiceBus 3.0 we have made plugging in your own transport mechanism much easier compared to 2.6. In 2.6 you would implement the ITransport interface wich is huge. In 3.0 you would only need to implement ISendMessages and IReceiveMessages

https://github.com/NServiceBus/NServiceBus/blob/master/src/unicast/NServiceBus.Unicast.Queuing/ISendMessages.cs

https://github.com/NServiceBus/NServiceBus/blob/master/src/unicast/NServiceBus.Unicast.Queuing/IReceiveMessages.cs


On NServiceBus 4.0 you can now just use Sql Server as a transport mechanism so you don't have to implement ITransport and such.


You probably want to look into implementing a custom ITransport to accomplish this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜