Just wrote up this demo,
void setup() {
Serial.begin(115200);
Spark.subscribe("one", oneHandler);
Spark.subscribe("two", twoHandler);
Spark.subscribe("three", threeHandler);
Spark.subscribe("four", fourHandler);
Serial.println("subscribed! waiting...");
}
void oneHandler(const char *topic, const char *data) {
Serial.println("1.)" + String(topic) + ": " + String(data));
}
void twoHandler(const char *topic, const char *data) {
Serial.println("2.)" + String(topic) + ": " + String(data));
}
void threeHandler(const char *topic, const char *data) {
Serial.println("3.)" + String(topic) + ": " + String(data));
}
void fourHandler(const char *topic, const char *data) {
Serial.println("4.)" + String(topic) + ": " + String(data));
}
void loop() {
}
With the CLI:
spark publish one 123
spark publish two 234
spark publish three 345
spark publish four 456
Serial output:
1.)one: 123
2.)two: 234
3.)three: 345
4.)four: 456
It’s possible you’re using webhooks too fast? You’re limited to 10 hook triggers per minute per core on your account, so if you have two you’re triggering every 10 seconds, you might be running over the limits?
I hope that helps!
Thanks,
David