Data Router ยท console.warn
addSource("{id}") was already registered; returning the existing source handle. Use a distinct id per feed.
Printed by Data Router, prefixed [lattice], since 1.34.0.
Warnings reference › data-router:duplicate-source
- Identifier
data-router:duplicate-source- Raised by
- Data Router
- Since
- 1.34.0
What happened
Two feeds were registered under one id. The second call did not create a second source: it returned the handle of the first, so both callers are now pushing into the same stream and the options of the second registration were ignored entirely.
The fix
Give each feed its own id, or keep the handle from the first addSource instead of calling it again.
The smallest fix
const trades = router.addSource('trades');
const quotes = router.addSource('quotes');
Reference
Covered in full at the API reference.