Open davidjirovec opened 3 years ago
We currently have some outstanding work to rate limit message passing for subscription to currency pairs.
I've actually implemented my own rate limiting. I've wrapped websocket sendMessage() by aspectj and Guava rate limiter. Not nice but working :) Problem is it takes a long time to be able to send all subscription messages I need.
Sending just one message to subscribe all required channels would be ultimate solution.
We can copy CoinbasePro's pattern for this as it handles this, feel free to open a PR for this
Current implementation supports only one currency pair subscribe per one sent message via websocket. In case of subscribing to many currency pairs, Kraken ws soon hits rate limits.
Kraken ws supports subscribe to multiple channels by one message https://docs.kraken.com/websockets/#message-subscribe
It would be nice to be able to use this ability. I guess info.bitrich.xchangestream.core.StreamingExchange#connect with ProductSubscription argument is good place to implement this.