@@ -42,15 +42,15 @@ go build -o bin/event-puller
42
42
43
43
``` bash
44
44
# Pull the latest image
45
- docker pull bacalhauproject /event-puller:latest
45
+ docker pull bacalhau-project /event-puller:latest
46
46
47
47
# Run with your environment variables
48
48
docker run -p 8080:8080 \
49
49
-e AWS_ACCESS_KEY_ID=your_key \
50
50
-e AWS_SECRET_ACCESS_KEY=your_secret \
51
51
-e AWS_REGION=your_region \
52
52
-e SQS_QUEUE_URL=your_queue_url \
53
- bacalhauproject /event-puller:latest
53
+ bacalhau-project /event-puller:latest
54
54
```
55
55
56
56
## ⚙️ Configuration
@@ -66,6 +66,18 @@ AWS_SECRET_ACCESS_KEY=your_aws_secret_key
66
66
AWS_REGION=us-east-1
67
67
SQS_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/123456789012/your-queue
68
68
69
+ # SQS Configuration Options
70
+ POLL_INTERVAL=100ms # Time between SQS polls (default: 100ms)
71
+ MAX_MESSAGES=10 # Maximum messages per poll (default: 10, max: 10)
72
+ NUM_WORKERS=5 # Number of concurrent SQS polling workers (default: 5)
73
+ WS_BATCH_SIZE=100 # WebSocket message batch size (default: 100)
74
+ BUFFER_SIZE=1000 # Message channel buffer size (default: 1000)
75
+ MAX_RETRY_ATTEMPTS=5 # Maximum retry attempts for SQS operations (default: 5)
76
+ INITIAL_RETRY_DELAY=100ms # Initial retry delay for exponential backoff (default: 100ms)
77
+ MAX_RETRY_DELAY=5s # Maximum retry delay (default: 5s)
78
+ SQS_VISIBILITY_TIMEOUT=30 # Visibility timeout for received messages (default: 30 seconds)
79
+ SQS_WAIT_TIME=0 # SQS long polling wait time (default: 0, max: 20 seconds)
80
+
69
81
# Optional Cosmos DB Variables
70
82
COSMOS_ENDPOINT=https://your-account.documents.azure.com:443/
71
83
COSMOS_KEY=your_cosmos_key
@@ -104,9 +116,9 @@ npm run build
104
116
105
117
** Solution** :
106
118
- Ensure AWS credentials have ` sqs:ReceiveMessage ` , ` sqs:DeleteMessage ` , and ` sqs:GetQueueAttributes ` permissions
107
- - Increase ` NUM_WORKERS ` (line 35 in main.go) for higher throughput
108
- - Add exponential backoff for transient errors
109
- - Implement better error handling and retry logic
119
+ - Increase ` NUM_WORKERS ` environment variable for higher throughput
120
+ - Adjust ` POLL_INTERVAL ` or ` SQS_WAIT_TIME ` for better polling behavior
121
+ - Adjust ` MAX_RETRY_ATTEMPTS ` , ` INITIAL_RETRY_DELAY ` , and ` MAX_RETRY_DELAY ` for better error handling
110
122
111
123
### Cosmos DB Integration Issues
112
124
0 commit comments