Maybe Iβm retarded
But on nostr-tools for example, I can create an event listener for a given filter (pool.subscribe) for a set of relays
But how do I do it for dozens/hundreds of separate filters on the same set of relays?
Maybe Iβm retarded
But on nostr-tools for example, I can create an event listener for a given filter (pool.subscribe) for a set of relays
But how do I do it for dozens/hundreds of separate filters on the same set of relays?
Create multiple subscriptions or pass multiple filters to subscribe
My bad, I'm dumb
SimplePool().subscribeMany(filters: Filter[])
Actually I'm getting this error:
NOTICE from wss://relay.damus.io/: ERROR: bad req: uneven size input to from_hex
NOTICE from wss://relay.primal.net/: ERROR: too many concurrent REQs
Ignore the hex one actually, but the concern is the "ERROR: too many concurrent REQs", which I was worried about by passing so many filters
use a relay that doesnβt do this or use less filters
I can definitely be selective on relays, but the whole point was to have several filters
The goal is to have filters passed to a notification service and then that service will send push notifications
These filters can be of any event type, pubkey mention or hashtag so several filters need to be concurrently listened to
Thanks for helping by the way π
try using multiple connections, it works around the dumber per-connection limiting ones. I hope any that limit by IP also have reasonable limits
nostr-tools is somewhat erratic. Depending on the version it will take arrays or single-filters, and aggregate them or not in a single REQ or spread them into multiple REQs. It did this last thing for a while when we were investigating moving the entirety of Nostr to single-filter REQs, but that didn't work because the forces of ossification are too strong, so now on the latest nostr-tools you can get multiple filters on the same REQ but only if you use the same relay multiple times in a call to subscribeMap().
Here's the notification service that I'm trying to build:
https://gitlab.com/lemonknowsall/nostr-push/-/blob/main/README.md?ref_type=heads
I find that it works for a period and then just stops
Hoping you have some good ideas
Here's a small snippet of the code:
