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 is not sent to subscribed users

See original GitHub issue

I subscribe current user to a specific message:

await _notificationSubscriptionManager.SubscribeAsync(AbpSession.ToUserIdentifier(), HatchConsts.KafkaMessages);

(The table AbpNotificationSubscriptions has proper value)

but when I publish notifications like this:

wait _notificationPublisher.PublishAsync(HatchConsts.KafkaMessages, notificationData);

(the table AbpNotifications has proper values)

nothing happens!

but when I publish notification like this:

await _notificationPublisher.PublishAsync(HatchConsts.KafkaMessages, notificationData,userIds:new []{ new UserIdentifier(1 , 1) });

(nothing in AbpUserNotifications table)

it works!

what is wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

acjhcommented, Jan 13, 2022

I think when I call PublishAsync method without UserIdentifier, the message should send to all subscribers, is that right?

No, if tenantIds is also null, then the message is sent to subscribers of the current tenant — in a background job, the current tenant would also be null, so the message is sent to subscribers of the host.

In a single database approach, you can pass NotificationPublisher.AllTenants to send the message to all subscribers:

- await _notificationPublisher.PublishAsync(HatchConsts.KafkaMessages, notificationData);
+ await _notificationPublisher.PublishAsync(
+     HatchConsts.KafkaMessages,
+     notificationData,
+     tenantIds: NotificationPublisher.AllTenants);
stale[bot]commented, Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notification is not sent to one particular user
Solved: Hi! I have a problem with a notification that is sent when a case is commented, contact language is not french and...
Read more >
Why am I not receiving notification emails? - Azure DevOps
Go to your personal subscriptions and locate the subscription, which you feel should have produced an email.
Read more >
Flow run success notifications are not sent to the subscribed ...
Issue. Flow run success notifications are not sent to the subscribed users via Slack. Environment. Tableau Cloud. Resolution.
Read more >
Email Subscribers not sending notifications
I am getting subscribers but welcome emails and notifications are not being sent. I have tried this using shortcode and widge…..same result.
Read more >
App Store Server Notifications not always sent to my server
We keep a record of all notifications that we receive from the App Store, and for these users we never received the "SUBSCRIBED"...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found