Commit 31a1a54
committed
fix(docs): correct what @imqueue actually takes off your hands, and answer three questions it never did
This post listed the pitfalls of hand-rolling RPC over Redis and then claimed the
library removes all of them: "Everything on the pitfalls list (correlation,
timeouts, at-least-once delivery, serialization, backpressure handling) lives in
the library, not in your service code." Three of those five were wrong, and each
fails silently, which is the worst way for a claim like this to be wrong.
- **Serialization.** It said @imqueue/core owns "the serialization that plain
JSON gets wrong" — four bullets after correctly warning that JSON.stringify
drops Date, Map, Set, BigInt and undefined. RedisQueue sets
`pack = useGzip ? pack : JSON.stringify` and the gzip helper is
`gzipSync(JSON.stringify(data))`, so it IS plain JSON and every one of those
losses applies. A reader trusted this page and shipped a Date across the queue.
- **Timeouts.** It said timeouts "are handled for you". `callTimeout` is unset by
default; the generated reference says an unset timeout means the caller's
promise waits forever on a service that never answers. Now stated as opt-in,
and the example client sets it.
- **At-least-once delivery.** Not something the library removes — it is the
property you design around, so handlers must be idempotent.
Also corrected `ClusteredRedisQueue` being called "the reliable message queue":
IMQ.create() returns RedisQueue for a single server, clustering spreads one queue
across instances, and reliability is the safeDelivery option. That exact
conflation was also in @imqueue/core's context7.json until today (60572e0) — the
wording is near-identical, so this page is the likely source of the rule Context7
has been serving to coding agents.
The prose claim is replaced by a table naming who owns each pitfall, because the
interesting half is what remains yours: timeouts until you opt in, delivery
semantics, serialization, and half of back-pressure.
Then three questions the docs could not answer at all, found by asking the hosted
3.3.0 server what a developer would ask it:
- "retry a failed RPC call" returned PgPubSubOptions.retryDelay, .retryLimit,
RETRY_DELAY and RETRY_LIMIT — pg-pubsub's Postgres LISTEN reconnection knobs,
offered for a question about RPC. Not silence: a wrong answer with config
values attached. There is no RPC-level retry, and now the page says so, with
why it is the caller's decision and where @imqueue/job fits instead.
- "coalesce duplicate concurrent calls" returned nothing relevant in six slots,
though @lock does exactly that. Documented, including the two limits that
matter: in-process only, and skipArgs for arguments that must not affect the key.
- "is there a circuit breaker" had no answer. There isn't one; what the queue
gives instead is a spike becoming latency rather than a cascade, which is
adjacent but not the same thing.
The three are `###` questions inside a `## FAQ` section so the generator turns
them into FAQPage markup: 83 answers across 15 pages -> 86 across 16.
The front matter matters more than the body here, and this is worth recording:
search_docs indexes `section + description + url` and never the page body
(mcp/src/docs.ts:525). Adding an answer to a page does not make it findable — the
llms.txt description is the index. So the summary and description now name
retries, call coalescing and the circuit breaker, and the meta description is 159
of its 160 characters.
Measured against a simulated post-deploy corpus: "how do I retry a failed RPC
call" and "does @imqueue have a circuit breaker" now return this page #1, where
both previously returned unrelated symbols. Keyword-shaped queries without an
interrogative still favour symbol names, because a prose entry scores 1x per term
against a symbol title's 5x — a ranker trade-off left deliberately alone.1 parent b0fc2fb commit 31a1a54
1 file changed
Lines changed: 74 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
125 | | - | |
126 | | - | |
| 130 | + | |
| 131 | + | |
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
131 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
132 | 139 | | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
142 | 162 | | |
143 | 163 | | |
144 | 164 | | |
| |||
154 | 174 | | |
155 | 175 | | |
156 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
0 commit comments