Skip to content

Release v0.0.24

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Mar 12:36

Major Changes to Queues API

In #335, major changes were made to the Queues API to bring it to parity with new features that have been introduced to the JavaScript API over time. This includes things like content type, delaying messages, and explicit acknowledgement and retries.

This comes with a few breaking changes:

  • Message fields like body, timestamp, and id are no longer public, and Message can no longer be created from a struct literal. Instead, these fields must be accessed via methods body(), timestamp(), and id().
  • iter() on MessageBatch no longer has a lifetime.
  • MessageBatch::new() has been removed.

New features:

  • ack() and retry() are now available on the individual message
  • retry_with_options() was added to allow specifying the QueueRetryOptions
  • ack_all() is now available on MessageBatch
  • retry_all_with_options() was added to MessageBatch to allow specifying the QueueRetryOptions
  • send_batch() is now available on Queue
  • It's now possible to set QueueSendOptions when sending a message
    • New builder structs MessageBuilder, BatchMessageBuilder, and RawMessageBuilder added to allow for the creation of messages with options.
  • Allow for sending and receiving of the raw JsValue (either Text or V8 content types):
    • Message now has a raw_body function that returns a JsValue.
    • raw_iter() fn has been added to MessageBatch.
    • Queue now has a send_raw and send_raw_batch function that allows sending of JsValue.

Thanks to @jdon !

Other Changes

  • Add worker-kv crate to repository. by @Kakapio in #494
  • chore(deps-dev): bump ansi-regex from 5.0.0 to 5.0.1 in /worker-kv/tests by @dependabot in #506
  • chore(deps-dev): bump the npm_and_yarn group group in /worker-kv/tests with 1 update by @dependabot in #508
  • Add semver checks and sanity-check build to create-release-pr by @kflansburg in #512

Full Changelog: v0.0.23...v0.0.24