WCF Transport Channel for SQL Server Service Broker
The WCF Transport Channel for SQL Server Service Broker (SSB transport) provides a WCF wrapper around SQL Server Service Broker (SSB), mapping SSB concepts to WCF concepts where applicable, and exposing additional SSB functionality through WCF extensions. It allows the WCF developer to leverage SSB while staying within the WCF Service Model or Channel Model programming models. The WCF SSB transport provides durable, two-way queue-based communications that requires only SQL Server 2005/2008 as its infrastructure.
Main Scenario is WCF Services and Clients communicating using One-Way WCF Contracts over Service Broker. Additionally Two-Way conversations, long-lived conversations, and interop between WCF and TSQL are supported.
The SSB transport is designed to expose most of SSB’s features and capabilities including durable conversations and conversation groups. As such, some design decisions have been made to “step outside” of the WCF model where it was necessary in order to expose important SSB features.
The WCF SSB transport is designed to support one way messaging from a sender to a receiver and vice versa. Each message exchanged belongs to an SSB conversation and a conversation can be long-running and span many messages. Two way communication is achieved by having the original sender receive messages on the conversation and the original receiver send messages on the conversation. So the conversation id is the mechanism for correlating sent and received messages.
To answer a FAQ up-front, this is sample code, and I don't know of any "official" effort in the product teams to produce a WCF Transport Channel for Service Broker, although everyone seems to agree that it's a useful thing to have.
The source is available under the Source Tab, and will be packaged up soon for an initial release. Feel free to brouse, build and test the transport channel. Please join the project and participate if you are interested in using this channel.