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

Update "stopWaitingForMessages" to abort the MQHandler request #1

Open
pccosta-pdm opened this issue Sep 14, 2023 · 0 comments
Open

Comments

@pccosta-pdm
Copy link
Owner

Scenario:

We have a situation where we have a wallet containing multiple DIDs that the browser is listening on. However, the browser restricts the number of simultaneous requests that can be made. To address this, we've created a manager to rotate through the DIDs.

Every so often, the "root" DID sends a message to the DID that needs to be closed, asking it to read the message and finish the request (which is stuck in a loop, because MQ is waiting for new messages).

However, this approach isn't scalable because, while the browser limits parallel requests to 6 (as an example), the delay in rotating the DIDs and the unnecessary requests for sending messages to cancellations increases as the number of DIDs to be rotated grows.

There have been some updates to OpenDSU that enable calling methods like "stopWaitingForMessages" However, these checks happen after or before processing, without interrupting or aborting the current request (the DID/MQHandler still keeps the active request even after the "stopWaitingForMessages" method has been called)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant