Skip to content

Commit 80e8c6b

Browse files
committed
docs: update documentation after event system removal
- Remove event system configuration from .example.env - Remove event system section from CONFIGURATION.md - Update README.md to show WithJob instead of WithEvent - Update ROADMAP.md to mark job system as implemented - Update docs/index.md feature list with job system - Remove 03-event-driven example directory - Update examples/README.md learning path and patterns
1 parent a8f5476 commit 80e8c6b

File tree

8 files changed

+22
-468
lines changed

8 files changed

+22
-468
lines changed

.example.env

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -222,41 +222,6 @@ CACHE_STORE=memory
222222
# CACHE_S3_BUCKET=my-cache-bucket
223223
# CACHE_S3_REGION=us-east-1
224224

225-
# -----------------------------------------------------------------------------
226-
# Event System (Redis Streams) - Enable with WithEvent: true
227-
# -----------------------------------------------------------------------------
228-
229-
# --- Redis Connection ---
230-
231-
# Option 1: Connection URL (recommended)
232-
# EVENT_REDIS_URL=redis://localhost:6379/0
233-
234-
# Option 2: Individual settings
235-
# EVENT_REDIS_HOSTS=localhost:6379
236-
# EVENT_REDIS_USERNAME=default
237-
# EVENT_REDIS_PASSWORD=secret
238-
# EVENT_REDIS_DB=0
239-
240-
# Legacy (deprecated)
241-
# EVENT_REDIS_ADDR=localhost:6379
242-
243-
# --- Consumer Settings ---
244-
# EVENT_CONSUMER_TIMEOUT=30s
245-
# EVENT_MAX_RETRIES=3
246-
# EVENT_RETRY_BACKOFF=1s
247-
# EVENT_DLQ_TTL=24h
248-
# EVENT_STALE_CONSUMER_TIMEOUT=5m
249-
250-
# --- Performance ---
251-
# EVENT_BATCH_SIZE=10
252-
# EVENT_MAX_PENDING_MESSAGES=1000
253-
# EVENT_CLAIM_MIN_IDLE_TIME=1m
254-
# EVENT_CLAIM_INTERVAL=30s
255-
256-
# --- Delayed Queue ---
257-
# EVENT_DELAYED_QUEUE_ENABLED=true
258-
# EVENT_DELAYED_QUEUE_CHECK_INTERVAL=1s
259-
260225
# -----------------------------------------------------------------------------
261226
# Lock System (Distributed Mutex) - Enable with WithLock: true
262227
# -----------------------------------------------------------------------------

CONFIGURATION.md

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -264,49 +264,6 @@ GOE supports multiple MongoDB connections. The default connection uses `MONGO_*`
264264

265265
---
266266

267-
## Event System (Redis Streams)
268-
269-
The event system uses Redis Streams for pub/sub messaging with support for consumer groups, dead letter queues, and delayed messages.
270-
271-
### Redis Connection
272-
273-
| Variable | Type | Default | Description |
274-
|----------|------|---------|-------------|
275-
| `EVENT_REDIS_URL` | string | - | Redis connection URL (priority over individual settings) |
276-
| `EVENT_REDIS_HOSTS` | []string | `localhost:6379` | Comma-separated Redis hosts |
277-
| `EVENT_REDIS_ADDR` | string | `localhost:6379` | Redis address (legacy, use `EVENT_REDIS_URL` or `EVENT_REDIS_HOSTS`) |
278-
| `EVENT_REDIS_USERNAME` | string | - | Redis username |
279-
| `EVENT_REDIS_PASSWORD` | string | - | Redis password |
280-
| `EVENT_REDIS_DB` | int | `0` | Redis database number |
281-
282-
### Consumer Settings
283-
284-
| Variable | Type | Default | Description |
285-
|----------|------|---------|-------------|
286-
| `EVENT_CONSUMER_TIMEOUT` | duration | `30s` | Consumer read timeout |
287-
| `EVENT_MAX_RETRIES` | int | `3` | Maximum retry attempts for failed messages |
288-
| `EVENT_RETRY_BACKOFF` | duration | `1s` | Delay between retries |
289-
| `EVENT_DLQ_TTL` | duration | `24h` | Dead letter queue message TTL |
290-
| `EVENT_STALE_CONSUMER_TIMEOUT` | duration | `5m` | Timeout for stale consumer detection |
291-
292-
### Performance Settings
293-
294-
| Variable | Type | Default | Description |
295-
|----------|------|---------|-------------|
296-
| `EVENT_BATCH_SIZE` | int | `10` | Number of messages to fetch per batch |
297-
| `EVENT_MAX_PENDING_MESSAGES` | int | `1000` | Maximum pending messages per consumer |
298-
| `EVENT_CLAIM_MIN_IDLE_TIME` | duration | `1m` | Minimum idle time before claiming messages |
299-
| `EVENT_CLAIM_INTERVAL` | duration | `30s` | Interval for checking claimable messages |
300-
301-
### Delayed Queue
302-
303-
| Variable | Type | Default | Description |
304-
|----------|------|---------|-------------|
305-
| `EVENT_DELAYED_QUEUE_ENABLED` | bool | `true` | Enable delayed message queue |
306-
| `EVENT_DELAYED_QUEUE_CHECK_INTERVAL` | duration | `1s` | Interval for processing delayed messages |
307-
308-
---
309-
310267
## Lock System (Distributed Mutex)
311268

312269
The lock system provides distributed locking using Redis with support for single instance, Sentinel, Cluster, and Redlock algorithms.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ WithHTTP: true, // HTTP server (Fiber)
120120
WithCache: true, // Caching system
121121
WithDB: true, // SQL database (GORM)
122122
WithMongoDB: true, // MongoDB
123-
WithEvent: true, // Event system (Redis Streams)
123+
WithJob: true, // Background job processing (Redis)
124124
WithLock: true, // Distributed locking
125125
})
126126
```

ROADMAP.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- GoFiber v3 - fastest Go HTTP framework
1717
- Uber Zap - production-grade structured logging
1818
- GORM - mature ORM with good ecosystem
19-
- Redis Streams - scalable, persistent event system
19+
- Redis - background job processing and distributed locking
2020

2121
**Production Readiness**
2222
- Health checks with liveness/readiness probes (K8s-ready)
@@ -34,7 +34,7 @@
3434
| `db` | ✅ Stable | GORM SQL database (MySQL, PostgreSQL, SQLite, SQL Server) |
3535
| `mongodb` | ✅ Stable | MongoDB native driver |
3636
| `cache` | ✅ Stable | Multi-backend caching (Redis, Memory, etc.) |
37-
| `event` | ✅ Stable | Redis Streams pub/sub with consumer groups |
37+
| `job` | ✅ Stable | Background job processing with scheduling and retries |
3838
| `lock` | ✅ Stable | Distributed locking (Redlock) |
3939
| `health` | ✅ Stable | Health checks (liveness/readiness) |
4040
| `metrics` | ✅ Stable | Prometheus metrics |
@@ -62,20 +62,21 @@
6262

6363
**Impact:** Very high - almost every app needs authentication
6464

65-
#### 2. Background Jobs / Task Queue
66-
**Current State:** Event system exists but no job queue
65+
#### 2. Background Jobs / Task Queue ✅ IMPLEMENTED
66+
**Current State:** Fully implemented with Redis backend
6767

68-
**What's Missing:**
69-
- Delayed job execution ("run this in 5 minutes")
70-
- Scheduled/cron jobs ("run every hour")
71-
- Persistent job queue (Redis/DB-backed)
72-
- Retry with exponential backoff
73-
- Dead letter queue for failed jobs
74-
- Job priorities and queues
75-
- Concurrency control
76-
- Job progress tracking
68+
**Features:**
69+
- ✅ Delayed job execution ("run this in 5 minutes")
70+
- ✅ Scheduled/cron jobs with human-friendly syntax
71+
- ✅ Persistent job queue (Redis-backed)
72+
- ✅ Retry with exponential backoff
73+
- ✅ Dead letter queue for failed jobs
74+
- ✅ Multiple named queues
75+
- ✅ Concurrency control
76+
- ✅ Job uniqueness/deduplication
77+
- ✅ Health checks and statistics
7778

78-
**Impact:** High - async processing is fundamental to scalable apps
79+
**Impact:** Completed - enable with `WithJob: true`
7980

8081
#### 3. Database Migrations
8182
**Current State:** Only GORM AutoMigrate (not suitable for production)
@@ -163,7 +164,6 @@
163164
- Rooms/channels abstraction
164165
- Broadcast helpers
165166
- Presence tracking
166-
- Integration with event system
167167

168168
#### 11. GraphQL Support
169169
**What's Missing:**

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ features:
4141
- icon: 🗄️
4242
title: GORM Database Integration
4343
details: Seamless integration with GORM for database operations, supporting MySQL, PostgreSQL, SQLite, and SQL Server.
44-
- icon: 🔄
45-
title: Event System
46-
details: Built-in event system using Redis Streams for publish-subscribe patterns, consumer groups, dead letter queues, and delayed message processing.
44+
- icon: 📋
45+
title: Job System
46+
details: Production-ready background job processing with human-friendly scheduling, delayed execution, retries with exponential backoff, and dead letter queues.
4747
- icon: 🍃
4848
title: MongoDB Support
4949
details: Native MongoDB integration with connection pooling, multiple database support, and helper utilities for indexes and transactions.

examples/03-event-driven/.env

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)