Skip to content

Hangfire extend#944

Merged
iammukeshm merged 3 commits into
fullstackhero:v2from
kallievz:HangfireExtend
Jul 1, 2024
Merged

Hangfire extend#944
iammukeshm merged 3 commits into
fullstackhero:v2from
kallievz:HangfireExtend

Conversation

@kallievz

Copy link
Copy Markdown
Contributor

Add queue for email
Add method extension to use specific queue.
Add sample on user register using queue email

@iammukeshm

iammukeshm commented Jun 25, 2024

Copy link
Copy Markdown
Member

So this creates a separate queue for email jobs? @kallievz

@kallievz

kallievz commented Jun 25, 2024 via email

Copy link
Copy Markdown
Contributor Author

@kallievz

Copy link
Copy Markdown
Contributor Author

Sorry, was AFK.

You can create multiple queues in Hangfire startup. Priority is community version is alphabetic in nature, thus Default will take preference over email queue. This can be used to trigger tasks that is not priority. Based on priority, highest will be processed first, and then lower priority. if all is low priority, and a higher priority task is triggered, task will be assigned to the next available broker to process, and then continue with the lower priority queue again. We using it like that in our production system for importing/exporting and background scheduled jobs.

@maxiar

maxiar commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

Hi @kallievz / @iammukeshm .... About Hangfire, What are yours opinion about HangfireMediator pattern to integrate with MediaR, please check this comment:
#907 (comment)
and this: https://codeopinion.com/using-hangfire-and-mediatr-as-a-message-dispatcher/

Regards!

@kallievz

kallievz commented Jun 28, 2024 via email

Copy link
Copy Markdown
Contributor Author

@iammukeshm
iammukeshm merged commit adaf6cd into fullstackhero:v2 Jul 1, 2024
iammukeshm added a commit that referenced this pull request Jul 31, 2024
* cleanup

* update license

* add global.json

* add server project

* cleanup

* added framework project

* update namespace

* cleanup

* cleanup

* cleanup

* added abstractions

* domain changes

* removed .vscode

* update gitignore

* update pagination base

* add wolverine

* add api versioning

* updated wolverine code gen

* versioned swagger ui

* minor updates to versioning

* added fluent validation

* initial domain designs

* minor fixes

* add extra validation for testing

* minor fixes

* moved to mediatr and behaviours

* minor cleanup

* added carter for automatic minimal api registration

* added inital readme

* architecture changes / include both clean and vsa

* added todo vsa arch module

* namespace cleanup

* minor cleanup

* added efcore and inmemorydb as default

* update exception handler

* rearranged application code

* cleaner dbcontext registration

* added initial ddd and edd

* added custom exception and get endpoint

* cleanup

* cleanup

* added ardalis specification package

* cleanup

* added paging support

* default params

* update swagger doc

* updated swagger metadata

* added support for publishing domain events

* context cleanup + shared events & db context

* added docker / docker compose support

* added finbuckle + pg migrations

* cleanup

* add hosted services for auto db migration

* initial multitenancy changes

* cleanup

* multitenancy cleanup + bug fixes

* add keycloak to docker compose

* make entity support multitenancy

* minor changes

* initial identity changes

* added default migrations

* cleanup

* minor cleanups + version fix

* add user registration

* minor fix

* added seq + docker compose

* add update user handler

* added token generation

* cleanup

* updated user service

* update finbuckle package to 7.0.1
+ other package updates

* fix finbuckle issues

* g

* cleanup

* update mail service

* update packages

* cleanup

* update

* update readme

* cleanup

* add caching

* add catalog context

* add keyed service for irepository

* Create build.yml

* update build path

* fix path

* fix framework path

* update reference paths

* add docker compose

* update yml

* switch to ghcr

* update yml

* update

* pull compose image from ghcr

* add banner image

* update readme

* cleanup

* add jwt auth and default auth policy

* add permisions + fix swagger

* auth change + permissions

* update container labels

* update container label

* by default disable redis

* fix permission requirements

* switch to finbuckle claim strategy

* add swagger auth requirement + fixes to current user

* update readme

* update permissions for endpoints

* add tenant endpoints + postman collections

* life saver commit
caches the tenant resolution call that was happening at every request
much better performance now

* update docker-compose

* hangfire integration

* package update

* hangfire null reference handle

* update docker compose variables

* update cicd

* update cicd

* terraform folder setup

* fixed all warnings

* sync namespaces

* fix namespace references

* update banner

* update container name

* update container user

* terraform intial changes

* update

* update readme

* update

* update

* add get user by id (#937)

* Update cicd.yml

* Update cicd.yml

* add terraform readme

* add file storage service (#938)

* add file storage service

* change FileStorage into Storage/File

* change FileStorage into Storage/File

* fix build

* fix warnings

* added MSSQL Provider (#939)

* add sql server

* add migrations for MSSQL Provider

---------

Co-authored-by: Mukesh Murugan <[email protected]>

* initial blazor web app push

* update cicd

* update cicd

* cicd

* test cicd

* revert

* update

* update readme

* update cicd

* test update

* seperated cicd pipelines

* update

* update appsettings.json

* update blazor folder structure

* initial mudblazor setup

* added get profile user (#935)

* add get profile

* clean

* Removing permissions for get current profile

---------

Co-authored-by: Mukesh Murugan <[email protected]>

* update readme

* refresh blazor setup

* update docker tags

* add cors

* initial blazor changes

* added few user endpoints (#936)

* add delete endpoint

* clean

* added ForgotPassword & ResetPassword endpoint

* fix warnings

* replace hardDelete with softDelete

---------

Co-authored-by: Mukesh Murugan <[email protected]>

* added roles endpoints (#940)

* init roleService

* wip

* AddTransientrole service

* login changes

* cors changes

* moved to blazor standalone wasm

* rename folder

* docker publish

* dockerfile for blazor wasm

* update compose

* update ports

* update

* update ports

* update blazor

* layout fixes

* update wasm

* update mudblazor to 7 preview

* update packages

* fix warnings

* rename github workflows

* upgrade todo endpoints

* added product getbyid function (#933)

* added product getbyid

* renamed exception class

* removed handler for query

* Revert "removed handler for query"

This reverts commit 0fa4df0.

* removed product read handler

* reverting proj and settings file

* Added product get list method

* added update endpoint for product

* fixes to product update

* fix update mechanism

* Added delete endpoint for product

* changed response of delete to 204 and made endpoints async

* updated proj file

* Update launchSettings.json

* Update Server.csproj

---------

Co-authored-by: Vipul Malhotra <[email protected]>
Co-authored-by: Mukesh Murugan <[email protected]>
Co-authored-by: Mukesh Murugan <[email protected]>

* theme preferences

* Added update and delete endpoint (#942)

* Added put endpoint

* Added delete endpoint

* removed itemgroup from proj file

* removed build warning

* Fix Spelling UpradeSubscription => UpgradeSubscription (#943)

* minor updates

* add popup provider

* update auth container size

* add person card to nav

* added sorting and searching (#941)

* wip

* wip

* add search

* add sorting

* clean

* wip

* wip

* added sorting & searching

* fix build

---------

Co-authored-by: Mukesh Murugan <[email protected]>

* Fix header injection vulnerability in the forgot password endpoint (#951)

* Fix Header Injection Vulnerability in the Forgot Password Endpoint

* Obtain origin from appsettings

* fiw warnings

* fix build

* init health check endpoint (#955)

* added rate limiting by IP (#952)

* added rate limiting by IP

* Implement global rate limiting with Fixed Window strategy and custom rejection message

* [v2] Change rate limit to options and add sercurity headers (#957)

* change rate limit to options and add security header

* add default config options for rate limit and security header in appsettings

* Hangfire extend (#944)

* Fix Spelling UpradeSubscription => UpgradeSubscription

* Extend Hangfire Services
Add Option to use specific queue
Add email queue

---------

Co-authored-by: Mukesh Murugan <[email protected]>

* Blazor Entity Table Generic

* Products Grid

* style fix

* blazor fixes to api caller

* add permissions

* fix modal

* add token refresh

* added opentelemetry (#963)

* update OTEL

* OTEL Fixes

* cleanup OTEL

* fix 404

* add todo ui

* fix blazor docker ports

* update launch settings for blazor

* update cors

* remove title validation

* Add Aspire Support #965

* namespace rename #965

* remove Blazor SLN #965

* fix blazor publish yml

* move dockerfile

* Prometheus Exporter #965

* Prometheus / Grafana Config Cleanup #965

* removed root route #965

* update blazor pipeline

* add dummy Directory.Packages.props to fix Blazor Docker Build

* added blazor theme manager

* Added Tenant Management UI

* Ui fixes

* blazor restructure

* added auth pages

* update page title

* add profile management

* update readme

* update readme

* added role / permission management + other fixes

* update nugets

* update packages

* added profile picture

* fixes #970
removed private setter for fsh tenant info class

* fix blazor warning (#973)

* copy assets folder to build ouput.
relates to #974

* update packages

* fixes #980

---------

Co-authored-by: Maxime <[email protected]>
Co-authored-by: vipulm124 <[email protected]>
Co-authored-by: Vipul Malhotra <[email protected]>
Co-authored-by: Kallie <[email protected]>
Co-authored-by: Kien Cao <[email protected]>
Co-authored-by: Vladimir <[email protected]>
nbhariyani pushed a commit to UCSProjects/dotnet-api-blazor that referenced this pull request Jul 31, 2024
* Fix Spelling UpradeSubscription => UpgradeSubscription

* Extend Hangfire Services
Add Option to use specific queue
Add email queue

---------

Co-authored-by: Mukesh Murugan <[email protected]>
@Christian-Schou

Copy link
Copy Markdown

Hi @kallievz

Looks great, could work for larger systems with lot of moving parts. I would definately be able to use in this way. I am currently using hangfire for managing email sending events for our clients. Would like to extend a bit more. I am foreseeing using Elsa, hangfire and Masstransit in union for our system, still figuring out the microservice part how it flows together, but getting there.

Did you figure out how to integrate Elsa or any other workflow system? I really like the work @iammukeshm and the other guys have done here 👌 but I would like to extend it even further and allow users to create their own workflows in the app.

My idea is to create a new trigger for Elsa that can subscribe to events generated by the server. The user would get a drop-down with possible events and then add the activities they would like to happen when that specific event occurs for their tenant. Of course, the flows have to be tenant-specific, and possible for every user who is a member of the tenant to edit. The flows should ideally be running on an Elsa workflow server so they are possible to trigger in the background when the user is not signed in, and a new event of a certain type is generated for that tenant in the backend.

@jacekmichalski

Copy link
Copy Markdown
Contributor

Hi @kallievz @Christian-Schou,
Elsa idea is really awesome. Maybe let's take it to discussion so that more people can see it. Maybe someone would be interested in creating a pull request with elsa. @iammukeshm what do you think about integrating Elsa with fullstackhero?

@Christian-Schou

Copy link
Copy Markdown

Hi @jacekmichalski 👋

Sounds like a good idea. I will take it to a new discussion and provide some details on my thoughts 😃

@kallievz
kallievz deleted the HangfireExtend branch January 9, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants