You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove write() return value and simplify TopicWriter API
- Fix seqNo renumbering bug: messages written before session initialization are now properly renumbered after receiving lastSeqNo from server
- Remove return value from write() method (now returns void) to simplify API
- Remove resolveSeqNo() method and related seqNo shift tracking infrastructure
- Update tests to remove assertions on write() return values
- Add changeset describing bug fix and API simplification
Fix seqNo renumbering bug and simplify TopicWriter API.
6
+
7
+
**Bug fix:**
8
+
9
+
- Fixed issue where messages written before session initialization were not renumbered after receiving `lastSeqNo` from server. Previously, auto-generated seqNo started from 0 and were not updated when server provided actual `lastSeqNo`, causing seqNo conflicts. Now messages are properly renumbered to continue from server's `lastSeqNo + 1`.
10
+
11
+
**API changes:**
12
+
13
+
-`TopicWriter.write()` no longer returns sequence number (now returns `void`) to simplify API and prevent confusion about temporary vs final seqNo values
14
+
15
+
**Migration guide:**
16
+
17
+
- If you were storing seqNo from `write()` return value, use `flush()` instead to get final seqNo:
18
+
19
+
```typescript
20
+
// Before
21
+
let seqNo =writer.write(data)
22
+
23
+
// After
24
+
writer.write(data)
25
+
let lastSeqNo =awaitwriter.flush() // Get final seqNo
26
+
```
27
+
28
+
- User-provided seqNo (via `extra.seqNo`) remain final and unchanged - no migration needed for this case.
0 commit comments