-
Notifications
You must be signed in to change notification settings - Fork 207
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
feat: add inbound message queue #339
feat: add inbound message queue #339
Conversation
Signed-off-by: Timo Glastra <[email protected]>
This has some issues with the process that keeps running. I'm going to refactor a bit (prob using rxjs) and update the PR |
Signed-off-by: Timo Glastra <[email protected]>
OK updated with observables. This makes it a lot easier. #335 also has a good case for observables so I think the added dependency is justifiable. It makes it a lot easier to handle such processes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think rxjs could be eventually used in more places. Good job 👍
Codecov Report
@@ Coverage Diff @@
## main #339 +/- ##
==========================================
- Coverage 88.38% 88.37% -0.02%
==========================================
Files 225 225
Lines 4088 4093 +5
Branches 455 480 +25
==========================================
+ Hits 3613 3617 +4
- Misses 475 476 +1
Continue to review full report at Codecov.
|
* feat: add inbound message queue * refactor: use observables for serial processing Signed-off-by: Timo Glastra <[email protected]>
commit 92a6c01 Merge: b292c34 624a8d9 Author: Adam Burdett <[email protected]> Date: Mon Jul 12 08:39:11 2021 -0600 Merge branch 'TimoGlastra-0211-3' into feature/0211-route-coordination commit 624a8d9 Author: Adam Burdett <[email protected]> Date: Mon Jul 12 08:37:30 2021 -0600 in memory message repo for sender tests Signed-off-by: Adam Burdett <[email protected]> commit a1a36d3 Merge: b292c34 d7294ca Author: Adam Burdett <[email protected]> Date: Mon Jul 12 07:45:49 2021 -0600 merge draft Signed-off-by: Adam Burdett <[email protected]> commit b292c34 Author: Adam Burdett <[email protected]> Date: Mon Jul 12 07:00:40 2021 -0600 formatting Signed-off-by: Adam Burdett <[email protected]> commit d7294ca Author: Timo Glastra <[email protected]> Date: Mon Jul 12 12:50:19 2021 +0200 test: full mediation flow Signed-off-by: Timo Glastra <[email protected]> commit 3141098 Author: Timo Glastra <[email protected]> Date: Mon Jul 12 10:15:49 2021 +0200 feat: pickup messages from mediator Signed-off-by: Timo Glastra <[email protected]> commit 0d021f0 Author: Timo Glastra <[email protected]> Date: Mon Jul 12 09:41:32 2021 +0200 refactor: use new query syntax for arrays Signed-off-by: Timo Glastra <[email protected]> commit 1d5636c Author: Timo Glastra <[email protected]> Date: Mon Jul 12 09:39:32 2021 +0200 feat: add mediator pickup strategy none Signed-off-by: Timo Glastra <[email protected]> commit cacf20f Merge: 906d1ae fb28935 Author: Timo Glastra <[email protected]> Date: Mon Jul 12 09:31:09 2021 +0200 Merge remote-tracking branch 'upstream/main' into 0211-3 commit 906d1ae Author: Timo Glastra <[email protected]> Date: Mon Jul 12 01:58:10 2021 +0200 style: small cleanup Signed-off-by: Timo Glastra <[email protected]> commit dd6402d Author: Timo Glastra <[email protected]> Date: Mon Jul 12 01:45:56 2021 +0200 fix: e2e.tests.ts working Signed-off-by: Timo Glastra <[email protected]> commit dbc9b3f Author: Timo Glastra <[email protected]> Date: Mon Jul 12 01:00:58 2021 +0200 fix: agents.test.ts working Signed-off-by: Timo Glastra <[email protected]> commit a3d46da Author: Timo Glastra <[email protected]> Date: Mon Jul 12 00:23:39 2021 +0200 feat: add mediator pickup strategy Signed-off-by: Timo Glastra <[email protected]> commit 4d5493e Author: Timo Glastra <[email protected]> Date: Mon Jul 12 00:07:52 2021 +0200 fix: incorrect forward logic Signed-off-by: Timo Glastra <[email protected]> commit 57e85aa Author: Timo Glastra <[email protected]> Date: Sun Jul 11 23:31:11 2021 +0200 fix: type errors Signed-off-by: Timo Glastra <[email protected]> commit 8741210 Author: Timo Glastra <[email protected]> Date: Sun Jul 11 23:26:53 2021 +0200 refactor: handle polling inside the framework Signed-off-by: Timo Glastra <[email protected]> commit e75414c Merge: 3c3a120 ea91559 Author: Timo Glastra <[email protected]> Date: Sat Jul 10 18:07:45 2021 +0200 Merge remote-tracking branch 'upstream/main' into 0211-3 commit 3c3a120 Author: Timo Glastra <[email protected]> Date: Sat Jul 10 18:04:54 2021 +0200 merge main Signed-off-by: Timo Glastra <[email protected]> commit e6d70c1 Author: Timo Glastra <[email protected]> Date: Sat Jul 10 16:40:42 2021 +0200 refactor: more mediation cleanup Signed-off-by: Timo Glastra <[email protected]> commit d308ffc Author: Timo Glastra <[email protected]> Date: Sat Jul 10 16:36:21 2021 +0200 docs: update docs to newest API Signed-off-by: Timo Glastra <[email protected]> commit 4459789 Merge: fb19af9 e7a56a8 Author: Adam Burdett <[email protected]> Date: Fri Jul 9 15:11:16 2021 -0600 Merge pull request #13 from TimoGlastra/0211 refactor: add assert connection on inbound message commit e7a56a8 Merge: 0052b79 fb19af9 Author: Adam Burdett <[email protected]> Date: Fri Jul 9 15:10:34 2021 -0600 Merge branch 'feature/0211-route-coordination' into 0211 commit fb19af9 Merge: 8b09cc8 a46bd21 Author: Adam Burdett <[email protected]> Date: Fri Jul 9 14:05:05 2021 -0600 Merge pull request #14 from TimoGlastra/0211-2 refactor: mediator recipient cleanup commit 8b09cc8 Author: Adam Burdett <[email protected]> Date: Fri Jul 9 14:02:47 2021 -0600 updated connections interface Signed-off-by: Adam Burdett <[email protected]> commit a46bd21 Author: Timo Glastra <[email protected]> Date: Fri Jul 9 21:40:51 2021 +0200 refactor: mediator module and service Signed-off-by: Timo Glastra <[email protected]> commit d29387c Author: Timo Glastra <[email protected]> Date: Fri Jul 9 19:31:28 2021 +0200 refactor: mediator recipient cleanup Signed-off-by: Timo Glastra <[email protected]> commit 0052b79 Author: Timo Glastra <[email protected]> Date: Fri Jul 9 18:43:14 2021 +0200 fix: remove unneeded injection symbols Signed-off-by: Timo Glastra <[email protected]> commit 3f73727 Author: Timo Glastra <[email protected]> Date: Fri Jul 9 18:31:47 2021 +0200 refactor: replace waitForEvent with observables Signed-off-by: Timo Glastra <[email protected]> commit 88faae8 Author: Timo Glastra <[email protected]> Date: Fri Jul 9 17:55:34 2021 +0200 refactor: add assert connection on inbound message Signed-off-by: Timo Glastra <[email protected]> commit c0c9df1 Author: Adam Burdett <[email protected]> Date: Fri Jul 9 01:52:39 2021 -0600 transport injection bug Signed-off-by: Adam Burdett <[email protected]> commit 319690d Author: Adam Burdett <[email protected]> Date: Fri Jul 9 01:49:42 2021 -0600 moved update keylist into mediator Signed-off-by: Adam Burdett <[email protected]> commit 6731aca Author: Adam Burdett <[email protected]> Date: Thu Jul 8 23:12:38 2021 -0600 path fix for lint Signed-off-by: Adam Burdett <[email protected]> commit 8b2f10a Author: Adam Burdett <[email protected]> Date: Thu Jul 8 22:46:53 2021 -0600 formatting Signed-off-by: Adam Burdett <[email protected]> commit 315ca8c Merge: b5ae8f1 b3213b9 Author: Adam Burdett <[email protected]> Date: Thu Jul 8 22:36:26 2021 -0600 Merge branch 'feature/0211-route-coordination' of github.com:atb-leap/aries-framework-javascript into feature/0211-route-coordination commit b5ae8f1 Author: Adam Burdett <[email protected]> Date: Thu Jul 8 22:36:14 2021 -0600 moved mediation ping Signed-off-by: Adam Burdett <[email protected]> commit b3213b9 Author: Adam Burdett <[email protected]> Date: Thu Jul 8 16:29:10 2021 -0600 Update src/modules/routing/services/RecipientService.ts Signed-off-by: Adam Burdett <[email protected]> Co-authored-by: jakubkoci <[email protected]> commit 3ccc0e1 Author: Adam Burdett <[email protected]> Date: Thu Jul 8 16:28:54 2021 -0600 Update src/modules/routing/services/RecipientService.ts Signed-off-by: Adam Burdett <[email protected]> Co-authored-by: jakubkoci <[email protected]> commit ca4a70b Author: Adam Burdett <[email protected]> Date: Thu Jul 1 19:36:22 2021 -0600 deb injection for inbound transporter Signed-off-by: Adam Burdett <[email protected]> commit 11448bc Author: Adam Burdett <[email protected]> Date: Thu Jul 1 18:36:25 2021 -0600 small changes after merge Signed-off-by: Adam Burdett <[email protected]> commit a81981b Merge: 39117c2 ddaec34 Author: Adam Burdett <[email protected]> Date: Thu Jul 1 18:30:04 2021 -0600 Merge branch 'feature/0211-route-coordination' of github.com:atb-leap/aries-framework-javascript into feature/0211-route-coordination commit 39117c2 Author: Adam Burdett <[email protected]> Date: Thu Jul 1 17:40:48 2021 -0600 return route in message sender Signed-off-by: Adam Burdett <[email protected]> commit ddaec34 Author: Adam Burdett <[email protected]> Date: Thu Jul 1 11:05:18 2021 -0600 Update src/modules/connections/services/ConnectionService.ts Signed-off-by: Adam Burdett <[email protected]> Co-authored-by: Timo Glastra <[email protected]> commit a332eac Author: Adam Burdett <[email protected]> Date: Thu Jul 1 11:04:11 2021 -0600 Update src/modules/connections/services/ConnectionService.ts Signed-off-by: Adam Burdett <[email protected]> Co-authored-by: Timo Glastra <[email protected]> commit fda92c5 Author: Adam Burdett <[email protected]> Date: Thu Jul 1 11:03:56 2021 -0600 Update src/modules/connections/services/ConnectionService.ts Signed-off-by: Adam Burdett <[email protected]> Co-authored-by: Timo Glastra <[email protected]> commit 250ce52 Author: Adam Burdett <[email protected]> Date: Thu Jul 1 11:03:14 2021 -0600 Update src/modules/connections/services/ConnectionService.ts Signed-off-by: Adam Burdett <[email protected]> Co-authored-by: Timo Glastra <[email protected]> commit 66d4d87 Author: Adam Burdett <[email protected]> Date: Thu Jul 1 01:46:56 2021 -0600 formatting Signed-off-by: Adam Burdett <[email protected]> commit 8fe9dd9 Author: Adam Burdett <[email protected]> Date: Thu Jul 1 01:45:06 2021 -0600 a few improvements Signed-off-by: Adam Burdett <[email protected]> commit 1ca3171 Author: Adam Burdett <[email protected]> Date: Wed Jun 30 15:40:12 2021 -0600 lost tags commit Signed-off-by: Adam Burdett <[email protected]> commit 6aade61 Author: Adam Burdett <[email protected]> Date: Wed Jun 30 14:49:20 2021 -0600 formatting Signed-off-by: Adam Burdett <[email protected]> commit ccf6bcf Author: Timo Glastra <[email protected]> Date: Wed Jun 23 18:05:30 2021 +0200 feat: use computed tags for records (openwallet-foundation#313) BREAKING CHANGE: Tags on a record can now be accessed using the `getTags()` method. Records should be updated with this method and return the properties from the record to include in the tags. Signed-off-by: Timo Glastra <[email protected]> commit 286f48d Author: Adam Burdett <[email protected]> Date: Mon Jun 28 14:47:26 2021 -0600 feature/0211-route-coordination Signed-off-by: Adam Burdett <[email protected]> commit 0c4206a Author: Timo Glastra <[email protected]> Date: Wed Jun 30 17:48:22 2021 +0200 feat: add inbound message queue (openwallet-foundation#339) * feat: add inbound message queue * refactor: use observables for serial processing Signed-off-by: Timo Glastra <[email protected]> Signed-off-by: Adam Burdett <[email protected]> Co-authored-by: David Clawson <[email protected]> Co-authored-by: Ariel Gentile <[email protected]> Co-authored-by: Daniel Bluhm <[email protected]> Co-authored-by: Patrick Kenyon <[email protected]> Co-authored-by: James Ebert <[email protected]>
Fixes #259
Fixes #337
Fixes openwallet-foundation/bifold-wallet#59
Adds inbound message queue with serial processing. The
agent.receiveMessage
does not yet use this queue as receiving messages directly on the agent seems separate and I think it won't interfere with the internal processing of messages.We can add it later, but we'd need to make the queue a bit more complex to be able to await
receiveMessage
. For now it should fix the race conditions as encountered by @MosCD3 and @pabloromeu