You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Overview

To achieve similar functionality as with internal systems - pushing information about new cases - but without connection to our internal Rabbit queueing system, external RabbitMQ instance is introduced.

Every client will have separate queue with template queue name: dis_notifications_{CLIENT_NAME}.

Every time case is created / updated / close / deleted message is sent to each client's queue who have permission to see that specific case.

General

To get notifications about cases you need to connect to Rabbit instance:

To do that you'll need to do proper auth (see more in Authentication part). After connection you can subscribe to your queue.
You will get notifications only about cases that your client have access to.

Persistance

To make sure that notifications will go out before sending notifications DIS is checking on health of external rabbit connection. To achieve this additional consumer is introduced to external rabbit (dis-healthcheck-stub) only for purpose of reporting connection health. If rabbit is down message is redirected to internal queue (dis-DelayedExternalNotifications) along with the list of clients that we should notify. Then consumer of this queue will try to send messages to external rabbit.

Notifications model

The messages that will go into the notifications queues are:

DIS.Queue.Models.IExternalSystemCaseNotification

and data inside:

    public interface IExternalSystemCaseNotification
    {
        Guid Id { get; }
        ExternalNotificationType NotificationType { get; }
        string? CaseDetailsUri { get; }
        DateTime? EventTime { get; }
    }

    public enum ExternalNotificationType
    {
        Created = 0,
        Updated = 1,
        Closed = 2,
        Deleted = 3
    }

Authentication

To be able to connect to Rabbit instance you're going to need user and password with access to proper queue. 

Change history

Title

Version

Applicability

Responsible

Revise date

Revise comment

Notifications 

1.0

DIS

9rd September 2024

Document created


  • No labels