Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: return # of messages prioritized in the queue when calling mess…
…age retry endpoint (#5132) ### Description Add a mpsc channel between relayer and message retry handler, so message retry handler knows the retry results from the relayer. `POST /message_retry` endpoint now returns a JSON with details on the retry request: ```rust #[derive(Clone, Debug, Deserialize, Serialize)] pub struct MessageRetryResponse { /// ID of the retry request pub uuid: String, /// how many pending operations were processed pub processed: usize, /// how many of the pending operations matched the retry request pattern pub matched: u64, } ``` #### New changes - use less memory by dropping uuid for some responses - changed channel size to 3 * number of destination chains - before it was just number of origin chains - this should prevent `Sender`s from being blocked when calling `send()` - added unittests to test `process_retry_requests` to ensure messages are being matched properly against `MatchingList` - use Arc for message retry requests so we don't need to clone the entire struct - add constant `SUBMITTER_QUEUE_COUNT = 3` ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues Fixes #4059 ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing Updated unit tests to return a response so the handler is not blocked --------- Co-authored-by: Paul Balaji <[email protected]>
- Loading branch information