Particle->Azure Event Hubs Webhook with Publishers URL format


We had no initial trouble forwarding data to the Azure Event Hubs with your webhook feature, following both your example and others online. However, all examples we have found to-date only support the simplest “Send an Eventhttps://{servicebusNamespace}{eventHubPath}/messages URL format. None have shown how to do the more useful “Send an Event with publisher IDhttps://{servicebusNamespace}{eventHubPath}/publishers/{publisherId}/messages URL format, which makes it easy to receive all messages in a logical group from a device in the same consuming process. We have not been able to get this pattern to work using the Particle Device ID as {publisherId}.

Our first thought was this had something to do with the way Particle generates the SAS token needed to POST the data to the Event Hub being different in some other way, but it appears that as long as the URL is provided it should just work.

Has anyone done this? Is there some simple reason this data does not go through (some internal Particle validation mechanism doesn’t know about this format?)? When we try to run a webhook set up this way, we receive the following messages through the Particle pub/sub:

About 10 of these:


Followed by a few of these:

{“name”:“hook-error/data-9-1459986218-1/0”,“data”:“Sleeping, too many errors, please wait and try again”,“ttl”:“60”,“published_at”:“2016-04-06T23:43:32.861Z”,“coreid”:“2a0045001747343337363432”}

Any insight would be appreciated. We can probably live without it, but it would be sure nice to have it, and it seems like it should work…

Well… in case someone else gets here… be very careful with the format of the URL. It appears we omitted the “servicebus” part of the URL in the webhooks we were testing with. Once that change was made, everything works as expected.