Particle.publish bug? Overlap in event name causing webhook to send to multiple endpoints

I have 3 different webhooks set up for Particle devices for customers in different geographical regions (NA, Europe, Asia) as my serverless endpoints are regional. The particle.publish() event names are respectively (see below):

  • scan
  • scan_europe
  • scan_asia

I started with only NA customers only and then began adding on international customers. However, as reported by a customer, the scan_europe events are also simultaneously hitting the scan endpoint causing duplicate events.

I also just verified this again on my end by creating a separate scan_dev event name and seeing it hit the scan endpoint. When I change the event name to just dev it does not.

Did I somehow miss this in the documentation? If this is a bug, can it be resolved so that I don’t have to individually flash unique event names for the various devices that are already out in the field?

Thank you.

That’s not a bug but by design.
And as such is documented for Particle.subscribe() which also applies to webhooks as it is using the same logic.

In you also get an info about this behaviour here (indicated by the term prefix)

Here is some info about the prefix in the docs:

Thanks both, now don’t I feel silly. Gotta do a better job of RTFM.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.