Интеграция SQL Service Broker и NServiceBus

Мое требование состоит в том, чтобы у меня были «предметы» с разными состояниями. Мне нужно делать разные вещи в зависимости от состояния этих элементов (отправлять электронные письма, хранить файлы, обновлять внутренние приложения и т. Д.). Проблема в том, что приложение, которое обновляет эти статусы, является сторонним, поэтому я не могу его обновить; Эта сложность усугубляется тем фактом, что только половина организации использует эту систему, а другая использует ее в будущем. У меня есть открытый доступ к обеим используемым базам данных.

Мой план состоит в том, чтобы добавить сообщение в очередь SQL Service Broker с идентификатором и статусом с помощью триггера в каждом представленииItem Таблица. Затем вызовите процедуру CLR из процедуры активации SSB, которая добавляет сообщение в очередь публикации через NServiceBus.

Казалось, что все шло хорошо, пока я не попытался зарегистрировать свои сборки в SQL сCREATE ASSEMBLY:

Msg 10327, Level 14, State 1, Line 1
Warning: The Microsoft .NET Framework assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=x86.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.

etc. etc. etc.

CREATE ASSEMBLY for assembly 'System.Web' failed because assembly 'System.Web' is not authorized for PERMISSION_SET = UNSAFE.  The assembly is authorized when either of the following is true: the database owner (DBO) has UNSAFE ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with UNSAFE ASSEMBLY permission.
Msg 10301, Level 16, State 1, Line 2
Assembly 'log4net' references assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
Msg 6218, Level 16, State 3, Line 3
CREATE ASSEMBLY for assembly 'NServiceBus.Core' failed because assembly 'NServiceBus.Core' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message
Msg 6218, Level 16, State 3, Line 4
CREATE ASSEMBLY for assembly 'NServiceBus' failed because assembly 'NServiceBus' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message

Во-первых, я хочу знать, является ли это совершенно безумной идеей. Я хочу, чтобы сообщения обрабатывались по порядку и добавлялись в очереди асинхронно. NServiceBus предоставляет хост-приложение, которое позволяет очень легко раскрутить новых издателей при необходимости. Кажется, что альтернативой является написание службы Windows, которая отслеживает очередь SSB, а затем публикует. Я просто хотел бы получить некоторые мнения или советы. Благодарю.

Ответы на вопрос(1)

Ваш ответ на вопрос