Im looking for a way to create Service Bus messages driven by on-prem CRUD SQL stored procedures (not azure). Basically, lets assume some background SQL process does a massive bulk update to a SQL table. Id like to simply create a service bus message for each (or all) ID of the affected records that some other process will subscribe to and be able to do something with...An example might be new employees inserted into the employee table and having some other process watching for service bus messages for new employees because it needs to run some sort of onboarding process..Thats completely hypothetical.If this has been answered before I apologize, but i cant seem to find much. Thanks!
Asked
Active
Viewed 514 times
1 Answers
1
Since you are using On premises SQL Server, you have access to the CLR and you will be able to access REST based services.
You can make a POST call to the Send Message endpoint for Azure Service Bus from a CLR Stored Procedure.
You can call the stored procedure after a successful insert into the employee table and push the message to Azure Service Bus queue.
That part is already answered here send msg to Azure service bus que via REST
More documentation for reference Accessing REST based Web services using SQL CLR

Kalyan Chanumolu-MSFT
- 1,063
- 6
- 12