This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Description
ipfs-core
{
version: '0.8.0',
repo: '10',
commit: '81f944163f5a78ef15fdc23b2c488ba7f44af0be',
'interface-ipfs-core': '^0.147.0'
}
ipfs-http-client
{
version: '0.8.0',
commit: 'ce693d7e8',
repo: '11',
system: 'amd64/linux',
golang: 'go1.16.2'
}
Severity:
High
Description:
Issue found at: https://stackoverflow.com/questions/68257274/cannot-subscribe-to-more-than-6-ipfs-pubsub-channels-with-ipfs-http-client
- Subscribe to 20 topics
- Publish to all 20 topics
- Only first 5-6 subs will get messages
Steps to reproduce the error:
First subscribe to the topics:
const { create } = require('ipfs-http-client');
async function echo(msg) {
console.log(`TopicID: ${msg.topicIDs[0]}, Msg: ${new TextDecoder().decode(msg.data)}`);
}
async function run() {
// connect to the default API address http://localhost:5001
const client = create();
console.log(await client.version());
for (let i = 0; i < 20; i++) {
await client.pubsub.subscribe(parseInt(i), echo);
}
}
run();
Then publish:
#!/bin/bash
for i in {1..20}
do
ipfs pubsub pub $i $i
done
Output is only:
{
version: '0.8.0',
commit: 'ce693d7e8',
repo: '11',
system: 'amd64/linux',
golang: 'go1.16.2'
}
TopicID: 1, Msg: 1
TopicID: 2, Msg: 2
TopicID: 3, Msg: 3
TopicID: 4, Msg: 4
TopicID: 5, Msg: 5