Skip to content

Releases: erans/lclq

v0.2.2

04 Dec 01:00
b91777b

Choose a tag to compare

Bug Fixes

REST API Push Delivery Fix

Fixed multiple issues that prevented push subscriptions from working via the REST API:

  • Message Fanout: REST API now properly fans out messages to all subscriptions when publishing to a topic, matching gRPC behavior
  • Subscription Queue Creation: REST API now creates a dedicated queue for each subscription, allowing messages to be stored per-subscription
  • Push Delivery Enqueueing: REST API now enqueues messages for push delivery when publishing to topics with push subscriptions
  • Fixed Queue ID Usage: Fixed pull, acknowledge, and modifyAckDeadline endpoints to use subscription ID instead of topic ID (was causing 500 errors)

Architecture Improvements

  • DeliveryQueue is now shared between gRPC and REST servers
  • PushWorkerPool is created once at startup and shared across both APIs
  • Unified push delivery infrastructure for consistent behavior

Testing

  • Added test_publish_enqueues_push_subscription_messages test
  • All 425+ tests passing

Release v0.2.1

03 Dec 23:25

Choose a tag to compare

lclq 0.2.1

Local Cloud Queue - AWS SQS & GCP Pub/Sub compatible emulator

Bug Fixes

  • REST API CreateSubscription now stores and returns pushConfig - Fixed an issue where the REST API was ignoring pushConfig when creating subscriptions, causing push delivery to fail for REST-created subscriptions. The gRPC API was working correctly.

Developer Experience

  • Added scripts/install-hooks.sh to install git pre-commit hooks
  • Added pre-commit hook that runs rustfmt --check on staged Rust files

Installation

Download the appropriate binary for your platform and run:

lclq start

Docker

docker pull erans/lclq:0.2.1
docker run -p 9324:9324 -p 8085:8085 -p 8086:8086 -p 9000:9000 -p 9090:9090 erans/lclq:0.2.1

Full Changelog: v0.2.0...v0.2.1

Release v0.2.0

03 Dec 02:45

Choose a tag to compare

🎉 lclq v0.2.0 - Push Subscriptions Release

🚀 Major New Feature: GCP Pub/Sub Push Subscriptions

lclq now supports automatic HTTP webhook delivery for Pub/Sub messages! Create push subscriptions and receive messages via HTTP POST to your endpoints - no polling required.

✨ Key Features

  • 🔔 Automatic HTTP/HTTPS Delivery - Messages pushed to your webhook endpoints automatically
  • 🔄 Exponential Backoff Retry - Configurable retry policy (default: 10s-600s, up to 5 attempts)
  • 💀 Dead Letter Topics - Failed deliveries automatically sent to DLT after max retries
  • 🎯 GCP-Compatible Format - JSON payload matches Google Cloud Pub/Sub push subscription format
  • ⚡ Lightweight Workers - Default 2 workers (configurable via LCLQ_PUSH_WORKERS env var)

📝 Quick Example

from google.cloud import pubsub_v1

subscriber = pubsub_v1.SubscriberClient()

# Create push subscription
subscription = subscriber.create_subscription(
    request={
        "name": "projects/my-project/subscriptions/my-push-sub",
        "topic": "projects/my-project/topics/my-topic",
        "push_config": {
            "push_endpoint": "http://your-app.local:8080/webhook"
        },
        "retry_policy": {
            "minimum_backoff": {"seconds": 10},
            "maximum_backoff": {"seconds": 600}
        }
    }
)

# Messages automatically delivered to your webhook!
# Return HTTP 2xx to ack, 4xx/5xx triggers retry

📚 Documentation

🔧 Improvements

Performance & Configuration

  • Optimized Worker Pool: Reduced default from num_cpus * 2 to 2 workers for local development
  • Environment Variable: Configure worker count with LCLQ_PUSH_WORKERS (e.g., LCLQ_PUSH_WORKERS=8 lclq start)
  • Removed Dependency: Eliminated num_cpus crate (no longer needed)

Testing

  • Integration Tests: Comprehensive end-to-end tests with webhook server
    • test_push_subscription_delivery - Verifies successful push delivery
    • test_push_subscription_retry_on_failure - Tests retry behavior with exponential backoff
  • All Tests Passing: 455 tests passing (including new push subscription tests)

Documentation

  • Comprehensive README: Added detailed push subscriptions section with examples
  • Configuration Guide: Worker pool sizing guidance for different traffic levels
  • Webhook Format: Documented JSON payload structure and acknowledgment behavior

📦 What's Changed

New Files

  • src/pubsub/push_queue.rs - Priority delivery queue with scheduled retry
  • src/pubsub/push_worker.rs - HTTP delivery worker pool with exponential backoff
  • tests/push_subscriptions_test.rs - Integration tests for push delivery
  • docs/push-subscriptions.md - Complete push subscriptions documentation
  • test_push_subscriptions.sh - End-to-end testing script

Modified Files

  • src/types/mod.rs - Added PushConfig and RetryPolicy types
  • src/pubsub/publisher.rs - Integrated push delivery queue
  • src/pubsub/subscriber.rs - Added push config parsing
  • src/pubsub/grpc_server.rs - Initialize push worker pool on startup
  • src/storage/sqlite/mod.rs - Push subscription persistence support
  • migrations/sqlite/20250101000000_initial_schema.sql - Push config columns
  • README.md - Enhanced with push subscriptions section and examples
  • Cargo.toml - Version bump to 0.2.0, removed num_cpus dependency

🐛 Bug Fixes

  • Fixed double base64 encoding in push worker (caught by integration tests)
  • Fixed N+1 query pattern in push subscription enqueueing
  • Fixed SQLite subscription tests (database path and foreign key constraints)
  • Fixed test file discovery by moving to top-level tests directory
  • Fixed rustfmt issues for CI compatibility

📊 Stats

  • Total Tests: 455 passing
  • New Features: 1 major (Push Subscriptions)
  • New API Endpoints: Push subscription configuration via existing Pub/Sub APIs
  • Documentation: 3 new docs sections, 1 new guide
  • Commits: 14 commits across 10 tasks

🔄 Migration Guide

No breaking changes! This is a fully backward-compatible release.

To use push subscriptions, simply:

  1. Create a push subscription with push_config specifying your webhook endpoint
  2. Publish messages to the topic
  3. Messages automatically delivered to your webhook
  4. Return HTTP 2xx to acknowledge

🙏 Acknowledgments

This release implements GCP Pub/Sub push subscriptions with full API compatibility, making lclq even more powerful for local development and testing of webhook-based Pub/Sub architectures.


Full Changelog: v0.1.0...v0.2.0

Pull Request: #2

Release v0.1.0

28 Oct 00:47

Choose a tag to compare

lclq 0.1.0

Local Cloud Queue - AWS SQS & GCP Pub/Sub compatible emulator

Installation

Download the appropriate binary for your platform and run:

lclq start

Docker

docker pull erans/lclq:0.1.0
docker run -p 9324:9324 -p 8085:8085 -p 8086:8086 -p 9000:9000 -p 9090:9090 erans/lclq:0.1.0

What's Changed

See CHANGELOG.md for details.