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

Implicit pickup of queued messages #378

Closed
TimoGlastra opened this issue Jul 14, 2021 · 0 comments
Closed

Implicit pickup of queued messages #378

TimoGlastra opened this issue Jul 14, 2021 · 0 comments

Comments

@TimoGlastra
Copy link
Contributor

With 0211 implemented we support being the mediator, and also being the mediatee. We support explicit pickup of messages on both the mediator and mediatee sides (using the pickup protocol). We also support implicit pickup of message for the mediatee side, but not yet for the mediator side.

This means that if AFJ is acting as a mediator, and want messages to be implicitly picked up this is not possible yet.

This should be a fairly straightforward change. We have a message queue (currently in memory) that holds messages that need to be delivered to connections. Messages get queued when we receive forward messages for connections that have no endpoint (didcomm:transport/queue).

If a transport socket is opened (HTTP or WS) and a message is sent by the other party, do the following:

  • If the message has return routing enabled, store the session (already done)
  • Process the message (already done)
  • If the processing of the message produced a response message, send it over the open socket
  • If the socket is still open (with HTTP if a response message is sent we can't send additional message), and there are messages waiting in the queue for that connection start sending messages from the queue over the socket.
  • If all messages are queued and the socket hasn't been closed, wait for the next message on the queue to arrive. This way messages will be sent over the socket as they arrive.

See #40 for more context on implicit / explicit pickup of messages

@TimoGlastra TimoGlastra changed the title mediator, implicit pickup of messages. Implicit pickup of queued messages Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant