PublishQueue for typed and extended publish! (PublishQueueExtRK)

New PublishQueueExtRK library! This is similar to PublishQueuePosixRK in that it stores the queue on the flash file system, but the Ext library only works with 6.3.0 and later but supports higher publish rate limits, typed publish, extended publish (up to 16384 bytes), binary event data, and structured event data.

5 Likes

Awesome! thanks

Hi, I noticed in this library we do not control the RAM:

So before we could do this:

// all events will be written to the file system immediately to reduce the chance of losing an event
PublishQueueExt::instance().withRamQueueSize(0);

But now that function is not there.
Are all events saved in the filesystem in this new library?
Thanks!

All PublishQueueExtRK events are stored on the file system.

With extended publish CloudEvent objects, all events larger than 1024 bytes are temporarily stored on the file system, so there's really no advantage in the added complexity of having a queue both in RAM and on the flash file system in the library.

1 Like

Thanks.

I also noticed that this library does not allow the user to set publish flags like WITH_ACK.

From the docs I read:

If you do not use WITH_ACK then the request is still acknowledged internally, and retransmission attempted up to 3 times, but Particle.publish() will return more quickly.

So there is no need anymore with this library to set the WITH_ACK flag?
Thanks

WITH_ACK is always true for the new publish API that takes a CloudEvent. And PRIVATE is always true in all cases, so there is no need for flags anymore.

The conditional ACK made sense to save a few bytes when there was a 1 MB cellular data limit per SIM, but even on the free plan there is ample cellular data to always ACK.

1 Like

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