Is there a limit on publish() and subscribe()

I don’t know about a publish limit apart from one event per second (with sporadic 4 per sec).

But the docs say about Spark.subscribe

NOTE: A Core can register up to 4 event handlers. This means you can call Spark.subscribe() a maximum of 4 times; after that it will return false.
1 Like