Skip to content

Releases: yudhasubki/blockqueue

v0.1.1

10 Jan 07:07

Choose a tag to compare

Major Features

High-Performance Write Buffering

  • Implemented batch write mechanism with configurable batch_size, flush_interval, and buffer_size
  • Async channel-based buffering reduces database roundtrips
  • Achieves ~39k msg/sec on SQLite (M1 MacBook Pro)

PostgreSQL Support

  • Full PostgreSQL driver support with connection pooling
  • Configurable max_open_conns, max_idle_conns, conn_max_lifetime
  • SQL query compatibility with sqlx.Rebind() for placeholder conversion

Subscriber Caching

  • In-memory cache for subscriber lookups with configurable TTL
  • Reduces database queries during message publishing
  • Automatic cache invalidation on subscriber changes

Enhanced Listener Configuration

  • Configurable poll_interval for message polling
  • Configurable dequeue_batch_size for batch consumption
  • Exponential backoff on empty queue (up to max_backoff)

Performance Improvements

SQLite Optimizations

  • WAL mode with periodic checkpointing
  • Configurable cache_size and mmap_size
  • busy_timeout configuration for concurrent access

Database Driver Improvements

  • Proper PRAGMA wal_checkpoint handling (SQLite only)
  • Connection string fixes for PostgreSQL empty password/timezone
  • Batch INSERT with parameter limit handling (PostgreSQL 65535 limit)

New Examples

  • example/basic/ - Simple usage with numbered steps
  • example/sqlite/ - SQLite with CLI flags and graceful shutdown
  • example/pgsql/ - PostgreSQL with connection configuration
  • example/http/ - HTTP client example

Configuration Updates

New config.yaml options:

sqlite:
  cache_size: -4000     # 4MB page cache
  mmap_size: 0          # Memory-mapped I/O size

write_buffer:
  batch_size: 100       # Messages per batch
  flush_interval: 100ms # Max time before flush
  buffer_size: 10000    # Channel buffer size

pgsql:
  max_open_conns: 25
  max_idle_conns: 10
  conn_max_lifetime: 5m
  conn_max_idle_time: 1m

Test Coverage

  • Added TestPartialAck - verifies partial acknowledgment behavior
  • Added TestVisibilityTimeout - verifies message status changes
  • Added TestLongPolling - verifies subscriber blocking read
  • Comprehensive benchmark suite (benchmark_test.go)

Breaking Changes

  • Removed legacy partition fields from BlockQueueOption
  • WriteBufferConfig replaces old partition configuration

Documentation

  • Completely rewritten README with HTTP and Library usage modes
  • API reference table with all endpoints
  • Driver configuration examples for SQLite, PostgreSQL, and Turso

Full Changelog: v0.0.5-beta...v0.1.1

v0.0.5-beta

05 Apr 03:01

Choose a tag to compare

Full Changelog: v0.0.4-beta...v0.0.5-beta

  • Add Partition

v0.0.4-beta

28 Jul 06:01

Choose a tag to compare

Full Changelog: v0.0.3-beta...v0.0.4-beta

Feature

  • Support PostgreSQL

v0.0.3-beta

18 Jun 02:50

Choose a tag to compare

Full Changelog: v0.0.2-beta...v0.0.3-beta

Feature

v0.0.2-beta

18 Dec 23:18

Choose a tag to compare

Changelog

Feature

  • [feat] Add Metric Prometheus
  • [feat] Sync option suggestion from Issues #3
  • [feat] Change mutex to spinlock efb8c9f
  • [feat] Unit test
  • [feat] Store job to the bucket with event pool

v0.0.1-beta

11 Dec 23:34

Choose a tag to compare