Skip to content

release: v0.4.0

Latest

Choose a tag to compare

@nebjak nebjak released this 21 Mar 18:33
59beb9d

What's New

This release aligns the Rust client with TLQ server v0.4.0, adding queue statistics support, simplified message states, and an improved builder API.

Added

  • QueueStats type and stats() method for retrieving queue statistics via GET /stats (ready, processing, dead counts)
  • ConfigBuilder::build_config() method for direct Config access when needed

Changed

  • ConfigBuilder::build() now returns TlqClient directly — no more TlqClient::with_config(builder.build()) boilerplate
  • lock_until field type changed from Option<String> to Option<u64> (Unix timestamp in milliseconds), matching server v0.4.0 format
  • Updated dependencies: tokio 1.50, uuid 1.22

Removed

  • MessageState::Failed variant — server v0.4.0 handles expired messages automatically via background reaper; dead message counts are available through stats()

Migration Guide

Builder pattern (simplification, not breakage for most users):

// Before (0.2.0)
let config = TlqClient::builder().host("localhost").port(1337).build();
let client = TlqClient::with_config(config);

// After (0.4.0)
let client = TlqClient::builder().host("localhost").port(1337).build();

MessageState::Failed — remove any pattern matches or filters on Failed. The server's reaper now handles stuck messages automatically. Use client.stats().await? to monitor dead message counts.

lock_until — if you read this field, update your code from Option<String> to Option<u64> (Unix timestamp in milliseconds).

Full Changelog: 0.2.0...0.4.0