Skip to content

Commit 338b35d

Browse files
authored
Merge pull request #229 from dacky179/feature/HelathStateOfNotificationSourceFacade
Do not ValidateHealthState for response of published notifications
2 parents c9fbbb9 + ef63206 commit 338b35d

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

src/Moryx.Notifications/Facade/NotificationSourceFacade.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,40 +57,35 @@ public override void Deactivate()
5757
/// <inheritdoc />
5858
public IReadOnlyList<INotification> GetPublished()
5959
{
60-
if (!IsActivated)
61-
ValidateHealthState();
60+
ValidateHealthState();
6261
return NotificationAdapter.GetPublished();
6362
}
6463

6564
/// <inheritdoc />
6665
public void Sync()
6766
{
68-
if (!IsActivated)
69-
ValidateHealthState();
67+
ValidateHealthState();
7068
NotificationAdapter.Sync();
7169
}
7270

7371
/// <inheritdoc />
7472
public void Acknowledge(INotification notification)
7573
{
76-
if (!IsActivated)
77-
ValidateHealthState();
74+
// No ValidateHealthState: Source published the notification; it must be able to handle a response, too!
7875
NotificationAdapter.Acknowledge(notification);
7976
}
8077

8178
/// <inheritdoc />
8279
public void PublishProcessed(INotification notification)
8380
{
84-
if (!IsActivated)
85-
ValidateHealthState();
81+
// No ValidateHealthState: Source published the notification; it must be able to handle a response, too!
8682
NotificationAdapter.PublishProcessed(notification);
8783
}
8884

8985
/// <inheritdoc />
9086
public void AcknowledgeProcessed(INotification notification)
9187
{
92-
if (!IsActivated)
93-
ValidateHealthState();
88+
// No ValidateHealthState: Source acknowledge the notification; it must be able to handle a response, too!
9489
NotificationAdapter.AcknowledgeProcessed(notification);
9590
}
9691

0 commit comments

Comments
 (0)