Skip to content

Releases: moonwalker/bedrock

v0.3.5

18 Dec 13:42

Choose a tag to compare

  • batchSize

v0.3.4

18 Dec 13:40

Choose a tag to compare

  • increase batchsize

use variant url

12 Dec 12:41

Choose a tag to compare

v0.3.2 - Adaptive Batching

08 Dec 11:12
995b99a

Choose a tag to compare

Performance and Reliability Improvements

Adaptive Batching Strategy

Replaced single large fetch with intelligent batching approach:

  • Batch size: 5,000 messages per batch
  • Adaptive timeout: Scales with batch size (batch_size/20 ms, minimum 100ms)
  • Smart termination: Stops when server returns ErrNoMessages

Performance Results

Small streams (15k messages):

  • v0.3.0/v0.3.1: 1-2s
  • v0.3.2: ~750ms → 2-3x faster ⚡

Medium streams (65k messages):

  • v0.3.0/v0.3.1: 1-2s (inconsistent)
  • v0.3.2: ~3.3s → Consistent and reliable ✅

Large streams (200k messages):

  • v0.3.0/v0.3.1: Timeouts or incomplete results
  • v0.3.2: ~10s → Handles correctly ✅

Fixes

  • v0.3.1 bug fixed: invalid argument: batch size must be at least 1 error when NumPending was 0
  • Race condition eliminated: No longer uses NumPending approach that caused inconsistent results
  • Consistency guaranteed: Timeout per batch ensures server completes gathering
  • Scales correctly: Time proportional to actual data size

Dependencies

Updated all dependencies to latest versions:

  • AWS SDK v2: v1.32.5 → v1.40.1
  • imroc/req: v3.48.0 → v3.56.0
  • Ginkgo: v2.20.2 → v2.27.2
  • And more...

Migration from v0.3.1

If you're on v0.3.1: Upgrade immediately - it has a critical bug causing batch size must be at least 1 errors

Recommended version: v0.3.2 (this release) for both performance and reliability

v0.3.1 - Performance Optimization

07 Dec 08:53
0b1e3c0

Choose a tag to compare

Performance Improvements

LastPerSubject Optimization

  • 19.42x faster execution using NumPending approach
  • Eliminates arbitrary timeout waits by checking exact message count
  • Uses ConsumerInfo NumPending + FetchNoWait for optimal performance
  • Maintains 100% consistency across all runs

Technical Changes

  • Reuse context instead of creating multiple context.Background instances
  • Reduced InactiveThreshold from 5s to 1s for faster ephemeral consumer cleanup
  • Removed old timeout-based implementation

Benchmark Results

  • Old method: ~1s per call (timeout-based)
  • New method: ~50ms per call (NumPending-based)
  • 5/5 runs consistently return identical results

v0.3.0 - NATS Upgrade & Performance Improvements

06 Dec 08:53
ea9ce44

Choose a tag to compare

🚀 Features

  • Upgrade nats.go to v1.47.0 (from v1.37.0) for latest performance improvements
  • Optimize for consistent results with

⚡ Performance Improvements

  • Fix inconsistency by using with timeout instead of
  • Use ephemeral consumer with for automatic cleanup
  • Reduce timeout from 30s to 1s for faster operation
  • Remove unnecessary consumer config (, )
  • Add consistency testing with 5 runs to verify reliable results

📦 Dependencies Updated

  • nats.go: v1.37.0 → v1.47.0
  • nkeys: v0.4.7 → v0.4.12
  • klauspost/compress: v1.17.9 → v1.18.2
  • golang.org/x/crypto: v0.29.0 → v0.45.0
  • golang.org/x/net: v0.31.0 → v0.47.0
  • golang.org/x/sys: v0.27.0 → v0.38.0

✅ Backward Compatibility

No breaking changes - all APIs maintain backward compatibility. Existing code will work without modifications.

🔗 Full Changelog

v0.2.9...v0.3.0

Upload video minus debug code

04 Dec 08:47

Choose a tag to compare

Video uploads via cloudflare batch upload

26 Nov 15:13

Choose a tag to compare

Media uploads via cloudflare batch upload

11 Nov 11:42

Choose a tag to compare

v0.2.30

31 Oct 14:22
5147813

Choose a tag to compare

Changes

  • Remove logrus package and its components (5147813)