Currently get subscribers api returns subscribers of a (topic, bucket) in block history. It takes around one block interval (~20s) for new subscribers to be included in the response. This is quite slow for many use cases.
Since we impose strict txn check, it’s almost guaranteed that txn in txn pool will eventually be included in block. Thus it makes sense to include subscribers in txn pool together with subscribers in block. Doing so will make subscribe much faster without compromising correctness.
To distinguish between subscribers in block and subscribers in tx pool, I’m suggesting to make response into this format:
subscribers: {subscriber1:metadata1, subscriber2:metadata2, ...}
subscribersInTxPool: {subscriber3:metadata3, subscriber4:metadata4, ...}
This will break the existing json rpc response, but we can handle it in sdk to make it compatible to both response scheme.