Skip to content

Commit defabec

Browse files
committed
Add GetStatus() to IMessageService to get the textual status of the MQ Hosts.
1 parent 2e7a00f commit defabec

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/ServiceStack.Common/Messaging/TransientMessageServiceBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ public IMessageHandlerStats GetStats()
5858
return total;
5959
}
6060

61+
public string GetStatus()
62+
{
63+
return isRunning ? "Started" : "Stopped";
64+
}
65+
6166
public string GetStatsDescription()
6267
{
6368
var sb = new StringBuilder("#MQ HOST STATS:\n");

src/ServiceStack.Interfaces/Messaging/IMessageService.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ public interface IMessageService
3333
/// </summary>
3434
/// <returns></returns>
3535
IMessageHandlerStats GetStats();
36-
36+
37+
/// <summary>
38+
/// Get the status of the service. Potential Statuses: Disposed, Stopped, Stopping, Starting, Started
39+
/// </summary>
40+
/// <returns></returns>
41+
string GetStatus();
42+
3743
/// <summary>
3844
/// Get a Stats dump
3945
/// </summary>

0 commit comments

Comments
 (0)