-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
Description
During internal testing and wrapper development, several issues and inconsistencies were identified that reduce clarity, maintainability, and correctness of the implementation:
- Naming inconsistencies in events, methods, and variables caused confusion, especially when terms from the spec (e.g., “delivered”) could be misinterpreted.
- Verb choices in methods like
sendMessage/receiveMessagewere misleading, as they did not reflect the actual behavior (messages are queued for SDS rather than directly sent/received). - The
Messagestructure lacked convenient methods for encoding/decoding, complicating usage. acknowledgementsterminology diverged from spec language (“possible” vs “partial”), creating semantic mismatches.- Event emission logic sometimes triggered events even when the underlying action did not occur.
- Duplicate messages in history caused acknowledgment handling problems.
- Testing coverage and logging were insufficient for debugging and validation.
Proposed Solution / Feature Design
To increase wrapper maturity and align it more closely with the spec, the following improvements have been implemented or initiated:
- Spec alignment – Added
senderIdper new spec PR #170. - Better data model – Converted
Messageto a class to provide built-inencode/decodemethods for easier handling. - Clearer event naming – Adjusted event names to clearly indicate whether they relate to incoming or outgoing messages, avoiding spec term ambiguity.
- Accurate method naming – Replaced misleading verbs (
sendMessage,receiveMessage) with terminology that reflects actual SDS behavior. - Consistent terminology – Updated
acknowledgementsnaming to match spec’s “possible” acknowledgment concept. - Improved logging and tests – Added/fixed tests and introduced logs for better traceability.
- Event emission correctness – Ensured events are only emitted when the related action truly occurred (e.g., “delivered” only when delivery happens).
- Duplicate message mitigation – Began removing history duplication to prevent acknowledgment issues (full fix planned in a separate PR).
fryorcraken and TimaFeyka
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done