diff --git a/Foundatio.sln b/Foundatio.sln index 5cd44f5e..674c0f87 100644 --- a/Foundatio.sln +++ b/Foundatio.sln @@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution src\Directory.Build.props = src\Directory.Build.props samples\Directory.Build.props = samples\Directory.Build.props NuGet.config = NuGet.config + global.json = global.json + Dockerfile = Dockerfile README.md = README.md EndProjectSection EndProject diff --git a/src/Foundatio/Messaging/scenarios.md b/src/Foundatio/Messaging/scenarios.md new file mode 100644 index 00000000..3039bb0e --- /dev/null +++ b/src/Foundatio/Messaging/scenarios.md @@ -0,0 +1,18 @@ +- Multiple receivers (pub/sub) + - Fire and forget + - Message acknowledgement +- Worker queues + - Single Worker + - Round robin workers +- Delayed delivery + - Can schedule delivery, messages are persisted to a message store and a background task polls for messages that are due and then sends them out +- Message persistence + - Not all messages need to be persisted and guaranteed delivery +- Message subscriptions are push based with prefetch count setting which should greatly improve throughput +- Can either use generic method overloads or use options to change the message type or topic the message is being published to +- Can subscribe to multiple message types by controlling the message topic instead of using the default topic per .net type +- Request/response + - Publishes message and then does a single message receive on a topic that is for that exact request and waits the specified amount of time +- Receive message (pull model) + - Equivalent of current worker queues pulling a single message at a time + - Ability to receive a batch of messages diff --git a/tests/Foundatio.Tests/Utility/SystemClockTests.cs b/tests/Foundatio.Tests/Utility/SystemClockTests.cs index a4adaa15..6fa845e4 100644 --- a/tests/Foundatio.Tests/Utility/SystemClockTests.cs +++ b/tests/Foundatio.Tests/Utility/SystemClockTests.cs @@ -21,9 +21,10 @@ public void CanSetTime() { Assert.Equal(now.ToLocalTime(), clock.Now); Assert.Equal(now.ToUniversalTime(), clock.OffsetUtcNow); + // set using utc now = DateTime.UtcNow; clock.SetTime(now); - Assert.Equal(now, clock.Now); + Assert.Equal(now, clock.UtcNow); Assert.Equal(DateTimeOffset.Now.Offset, clock.Offset); Assert.Equal(now.ToUniversalTime(), clock.UtcNow); Assert.Equal(now.ToLocalTime(), clock.Now);