PublishQueueExt (CloudEvent API) corrupt/not sending events, but Particle.publish does

Dear all,

Title says most - I have some findings in the github issue here as well:

For some reason, my events are not going through when CloudEvents are sent using the ParticlePublishExtRK library (latested version from May being used), but sending exactly same event with Particle.publish works perfectly. I suspect something is getting corrupted, as events either are not being sent (when I attach .data) or when I only send an event without .data, it comes back as

{"content-type":0,"name":"tev"}X��U�

on Particle Console (event stream).

Where using PublishQueueExt will keep retrying the CoAP until it fails and the queue will start to build up.

What overload are you using to publish the data?

I've tried both the VariantMap overload and the CloudEvent overload (which is the one I'm currently comparing normal Particle.publish to PublishQueueExt atm)

I think there is a bug if you pass a cloud event with no data, I'll take a look later today.

1 Like

Let me know if I should test something, I'm focusing on this for the remainder of Today.

I'm not positive this is the bug you are seeing, but it may fix the problem.

0.0.7 (2025-05-12)

  • Fixed bug when you have no event data.
  • Fixed a bug when non-structured, non-variant events could have garbage data at the end of the event data.
1 Like

Thank you for responding so quickly @rickkas7 - I've just update the library code and it looks like it's working now and I'm getting well-structured JSON on Particle Console. I'll test some more, roll it out on our test units in the field for a larger scale test.

1 Like