-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: subscription not found if we start the node with the --pubsub-topic and we attempt to retrieve messages #1064
Comments
I remember changing this behaviour as part of REST API changes at some point. Hence i had modified the behvaiour to only receive messages if someone subscribes explicitly via REST API for a pubsubTopic. Otherwise, for every node that is running supporting various pubsubTopics for relay (e.g in TWN each node specifies all pubsubTopics it is supporting which is 8 shards), messages are being un-necessarily sent up to the messageCache and then discarded because there is no consumer of these messages. This segregates the functionality of a node's ability to just relay messages for a pubsubTopic (by specifying it in argument via --pubsub-topic) vs a node that wants to consume messages on a pubsubTopic (by subscribing via REST API). |
So, to summarize after starting the node if you send a REST API request to subscribe to pubsubTopic then you should be able to fetch messages relayed on that topic via GET messages API. |
Thanks for the explanation, it makes sense indeed to work this way. |
I agree that would be better. Use the config for shards and REST for app lvl stuff. |
Thanks, I've opened this change request on nwaku side |
Describe the bug
If we start the node with
--pubsub-topic=/waku/2/rs/0/0
and we try to query messages with relay/v1/messages based on that content topic we will getno subscription found for pubsubTopic
To Reproduce
go-waku version/commit hash
go-waku latest
Additional context
Same thing happens if I use different cluster id and content topics ex
--cluster-id=2
and--pubsub-topic=/waku/2/rs/2/0
If we do a subscribe request before checking messages it will work but I would expect it to work without it, because it should subscribe, like on nwaku, to the pubsub-topic from the config
curl -v -X POST "http://127.0.0.1:7682/relay/v1/subscriptions" -H "Content-Type: application/json" -d '["/waku/2/rs/0/0"]'
Uploading logs_docker.zip…
The text was updated successfully, but these errors were encountered: