Code Monkey home page Code Monkey logo

taskbroker's Introduction

Sql Server Service Broker External Activation Message Handler

A generic host based .NET core app which can be run as a Windows Service.

Building and creating a service

Build and publish

dotnet publish --configuration Release

Define the service

sc create TaskBrokerService binPath= "c:\DATA\DEVELOP\TaskBrokerCore3\TaskBroker\bin\Release\netcoreapp2.2\win7-x64\publish\TaskBroker.exe"

Start the service

sc start TaskBrokerService

For further details see the blog post Running a .NET Core Generic Host App as a Windows Service

Why this thing is needed

External activation helps to execute external tasks (written in C#) from inside of Sql Server Stored Procedures. The benefits that the tasks (executors) are executed outside of Sql Server process and implemented in more robust language than Transact SQL. For example, i use it to write stored procedures for some Reports (in SQL Server Reporting Services) - when the report is executed the stored procedure triggers execution of a task and waits for its completion. When the execution of the task is completed, the report is created based on the data obtained from the execution of that task. There are more possibilities (Application to Application communication), but for them, it is more convenient to use other Message Buses (like - NServiceBus, MassTransit or Rebus). And this thing is better for SQL Server - Outside World communication (send emails, import data, etc). It can also be used as a relay to send mesages further to a different message broker like Kafka or Rabbit MQ.

Why other Message Buses rarely use Sql Server Service Broker (SSSB) Transport

It is difficult to plug SSSB transport into existing message buses, because SSSB message handling has its peculiar features which need special message processing infrastructure. So it is better to use specific application for this task, than to try to squeeze it into existing applications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.