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

MessagePickupRepositoryClient not persisting messages with DirectDelivery forwarding strategy #39

Open
tipusinghaw opened this issue Dec 10, 2024 · 1 comment

Comments

@tipusinghaw
Copy link

I am trying to integrate MessagePickupRepositoryClient in the mediator and using the DirectDelivery message forwarding strategy. On the holder side, I am using MediatorPickupStrategy.PickUpV2.

When the holder is not active, and the issuer sends a message, the message is not stored in the mediator, redis, or MongoDB.

However, this works perfectly when using the MessageForwardingStrategy.QueueAndLiveModeDelivery.

I would like to clarify if MessagePickupRepositoryClient is designed to persist messages only when using QueueAndLiveModeDelivery, or if it should also support persistence with the DirectDelivery strategy.

@genaris
Copy link
Contributor

genaris commented Dec 11, 2024

Hey @tipusinghaw, thanks for the comment!

In normal situations, when you use DirectDelivery message forwarding strategy and your holder is not active (i.e. no WebSocket opened between it and its mediator), Credo will simply add the message to the message pickup queue, much in the same way it does if you use QueueOnly or QueueAndLiveModeDelivery, so I'm surprised that messages are not being added to MongoDB.

The diference between these modes happens mainly when holder is active. In such case, Credo will not call addMessage. So I'm wondering if in your case probably the websockets are somehow still active and the mediator is trying to send the encrypted messages directly.

That being said, we are using this project along with a multi-instance DIDComm mediator that is using QueueOnly as strategy, so probably I'm missing something and there is a problem we need to solve.

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

2 participants