Skip to content

Web Hook Hub, the ease way to create a clean webhook hub with Hangfire

License

Notifications You must be signed in to change notification settings

gmoreno90/webhookhub

Repository files navigation

Web Hook HUB

The proposal for this project is that want to have a Web Hook Hub to manage all the webhook notification of the same company

Build Status

  master dev
Linux / OS X Travis CI Build Status Linux and OS X Build Status

Main Features!

  • Multiple Clients
  • Multiple Events
  • Multiple Configurations (Enpoints)
  • Custom Retry Policies
  • Background Jobs
  • Multi-Server Manage Jobs
  • Webhook Request Instant process or delayed
  • Configured Workers Count per Instance
  • CustomJobId for generate Event Dependencies
  • JobDelay in ms for non-scalable endpoints
  • Configure restrictions / force events for specific instances

Flow Diagram

Show Here

Configuration File

Inject appsettings.json file

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "LogsDaysPurge": 2,
  "HangFireConfig": {
    "HangFireRetryIntervalInSeconds": [ 10, 30, 60, 120 ],
    "DashboardUserName": "XXXXXX",
    "DashboardPassword": "YYYYYY",
    "DashboardPath": "/HangFireDashboard",
	"MaxArgumentToRenderSize":  25000,
	"WorkerCount": 10,
    "JobDelay": 0,
    "IgnoredQueues": [ ],
    "ForceQueues": [ ]
  },
  "ConnectionStrings": {
    "DefaultConnection": "server=XXXXXXXX;database=YYYYYYYYYY;uid=WWWWWWWWW;password=ZZZZZZZZ;"
  },
  "DefaultTimeOutInMiliSeconds": 20000,
  "VersionNumber": "v1.0.3" 
}

####Using Environment Variables

ConnectionStrings__DefaultConnection 	server=XXXXXXXX;database=YYYYYYYYYY;uid=WWWWWWWWW;password=ZZZZZZZZ;
HangFireConfig__DashboardUserName		XXXXXXX2
HangFireConfig__DashboardPassword		YYYYYYY2
HangFireConfig__DashboardPath			/HangFireDashboard2
	

Service Allways UP

In order to configure this website allways up, please follow the next documentation

https://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html

Docker

DockerFile with the project MSSQLServer Express For the Database

docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build

Tech

  • [.NET 5.0] - Build the business and the APIs
  • [HangFire] - For Manage Queues and Background Process.

License

MIT

Free Software, Hell Yeah!