question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notification publisher is not working with HangFire?

See original GitHub issue

Using ABP 10.0

Hi,

When I use following publish code:

_notiticationPublisher.PublishAsync("System.AdminMessage", data, severity: severity, tenantIds: new int?[] {tenantId})); It’s doesnt save anything to database. Can be that I am using HangFire default IBackgroundJobManager ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ismcagdascommented, Sep 20, 2016

Hi,

Can you try with disabling backgroundJobs with this line in PreInitialize of your web module ? Configuration.BackgroundJobs.IsJobExecutionEnabled = false;

Then try to publish notification with: _notiticationPublisher.PublishAsync("System.AdminMessage", data, severity: severity, tenantIds: new int?[] {tenantId}));

If NotificationInfo is saved to database, then probably NotificationDistributer is deleting NotificationInfo records from AbpNotifications table when Configuration.BackgroundJobs.IsJobExecutionEnabled = true;. This is the expected behaviour actually.

https://github.com/aspnetboilerplate/aspnetboilerplate/blob/763e718341a42ef1799d9ded5fae228f652d7a6b/src/Abp/Notifications/NotificationDistributer.cs#L52

0reactions
AlexSenchenkocommented, Sep 26, 2016

Thanks. I will create Feature Request for keep history of sent notifications.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hangfire doesnt work anymore after publishing the project
I'm working with ASP.NET MVC 5. .NET Framework has the version 4.5. After I published my Project, Hangfire doesnt work anymore. So my...
Read more >
Significant memory leak on production server - .NET, IIS ...
We use Hangfire service for scheduling some operations like sending notifications or reloading some data. Each of them occurs single time or ...
Read more >
Hangfire with ASP.NET Core
Hangfire is an open-source task scheduler for ASP.NET and ASP.NET Core. It's simple to integrate, multi-threaded and easily scalable.
Read more >
Background Tasks and Scheduled Jobs in .NET? Meet ...
Do you often find yourself grappling with managing background tasks and scheduled jobs in your .NET or C# applications?
Read more >
Implementing the Outbox Pattern Using Hangfire and ...
Implementing the outbox pattern with CQRS-Style request/notification handler decorators on top of Hangfire is a nice and easy solution for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found