Base solution for your next web application
Open Closed

Multiple Notifiers issue #12305


User avatar
0
kansoftware created

I want to call the SignalRRealTimeNotifier service, but the system is calling the EmailRealTimeNotifier service by default.

How can I handle multiple notifiers simultaneously based on my requirements? For example:

If I want to call SignalRRealTimeNotifier, it should be called. If I want to call SmsRealTimeNotifier, it should be called. I have also set UseOnlyIfRequestedAsTarget=false specifically for the SignalRRealTimeNotifier.

Please refer to the attached image for more details.


3 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @kansoftware

    Have you reviewed this document?

  • User Avatar
    0
    kansoftware created

    Hi @kansoftware

    Have you reviewed this document?

    Yes I have reviewed the document. I am using abp Version(13.0.0).

    And I am sending the notification like this :-

    but I am not getting hit on 'getNotification' in signalr.bundle.min.js

    why I don't know.

    Should I pass value in TargetNotifiers = "SignalR" in UserNotification when sending notification.

    How SendNotificationsAsync method will be trigger in Abp.AspNetCore.SignalR.Notifications.SignalRRealTimeNotifier ?

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @kansoftware

    Here you can inject the IAppNotifier interface and call the SendMessageAsync method. This method will publish the message to the Target notifiers. If you want to trigger "getNotification", you can trigger the event with the Send method after receiving the client from the hubContext.

    Related Comment

    The 'abp.notifications.received' event is not triggered if you don't connect to AbpCommonHub. More details on the flow of SignalR, when sending notifications from the back-end to the front-end: https://stackoverflow.com/questions/48020021/signalr-integration-for-asp-net-boilerplate/48020732#48020732