Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/unified messaging #140

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2626516
Working on new unified messaging abstraction
ejsmith Mar 7, 2019
45487ca
Move IMessage interface to publisher for easier review
ejsmith Mar 7, 2019
0ca70c5
Add message queue options interface
ejsmith Mar 7, 2019
bef031e
Remove priority for now, can be added later
ejsmith Mar 7, 2019
41cf785
More changes
ejsmith Mar 7, 2019
34c6859
Minor
ejsmith Mar 7, 2019
1a207c5
Some comments
ejsmith Mar 23, 2019
e98bde9
Added some more notes for messaging
ejsmith Apr 8, 2019
0f0898f
Flow message type through methods in MessageBusBase
ejsmith May 7, 2019
a358b92
Adding ITypeNameSerializer to control how message types are converted…
ejsmith May 8, 2019
9d0363e
Some cleanup
ejsmith May 8, 2019
cf56b0f
Progress on new messaging implementation
ejsmith May 10, 2019
4052645
Change from Headers to Properties
ejsmith May 10, 2019
2d48478
Simplify IMessageStore
ejsmith May 10, 2019
cf168d5
Limit in memory message sending to 50 at a time
ejsmith May 11, 2019
3bfcadd
Cleanup unused namespaces
ejsmith May 11, 2019
ad4a4cc
Adding new WorkScheduler and other messaging progress
ejsmith May 12, 2019
96ce1b0
Adding 1st work scheduler test
ejsmith May 12, 2019
fa07c94
Minor
ejsmith May 13, 2019
476d7ac
More work scheduler tests
ejsmith May 13, 2019
ab0d114
Changing tests to make use of SystemClock
ejsmith May 13, 2019
95bbbbb
Fix broken test, freeze time and use fake sleep automatically when us…
ejsmith May 13, 2019
9f77042
Little more progress
ejsmith May 13, 2019
6a5421c
Some work scheduler test changes
ejsmith May 15, 2019
c8889b3
Progress
ejsmith May 31, 2019
d99451c
More systemclock changes
ejsmith Jun 3, 2019
1d66777
More changes to system clock to allow timers
ejsmith Jun 4, 2019
41ffe35
Update deps and fix some tests
ejsmith Jun 12, 2019
8cf4d1e
Minor
ejsmith May 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update deps and fix some tests
ejsmith committed May 6, 2022
commit 41ffe3541b5dd5cbc2fe4631a562088ae7db71ff
2 changes: 2 additions & 0 deletions Foundatio.sln
Original file line number Diff line number Diff line change
@@ -14,6 +14,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
18 changes: 18 additions & 0 deletions src/Foundatio/Messaging/scenarios.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion tests/Foundatio.Tests/Utility/SystemClockTests.cs
Original file line number Diff line number Diff line change
@@ -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);