This is difficult to do transactionally using push technology.
The only transactional option for this is to use the WCF bridge, and it, in turn, requires the use of SQL Server 2008, since since 2012, dynamic background compilation of WSDL-based assemblies has been blocked by the CLR hosted on SQL Server, and I never tried to force Compile these assemblies in such a way as to avoid references to assemblies that are prohibited by hosted CLR policies.
The only choice I found working (possibly due to the fact that I could not find a workaround) was to use an HttpClient RESTFull-style network client with an integrated CLR procedure running on SQL Server Broker Activated. It really works well with only one problem, RESTFull does not support transactional out of the box. Thus, if you need guaranteed message delivery, you will need a control call somewhere in the message flow.
In fact, to protect the integrity of MSMQ operations, I inserted a WCF transactional service between my RESTFull and MSMQ, and in MSMQ I used a trigger, which in turn has policy-driven transactional processing. Please note that to start MSMQ, you need to install the MSMQ start function. I chose an exe-based trigger, since an alternative approach is to use a COM-based DLL, and I didn’t feel like using COM, since a free multi-threaded DLL requires the implementation of a complex C ++ application and multi-threaded, which is relatively easy to design in C # with CCW will be flat threaded, and this imposes some limitations on the scale of application. In the end, a RESTFull call can be thought of as "almost transactional," because it is executed in the context of a transaction, and if you don't have serious errors, such as skipping, to catch the error condition (basically, skip the try / catch implementation) and throw, when you need to raise the error condition, you get the advantage of reliable commit / rollback. However, to ensure reliable message delivery, it is desirable to have reinforcement with a test call and a reasonable wait time when missing data is considered equal to no commit.
Myron
source share