feat: FCM 실서비스 확장 - 대량 발송 및 무효 토큰 관리

- FcmSender.sendToMany() 추가 (chunk/rate limit 지원)
- FcmBatchResult 클래스 추가 (발송 결과 집계)
- fcm:send 명령어 추가 (대량 발송, dry-run 지원)
- fcm:prune-invalid 명령어 추가 (무효 토큰 정리)
- PushDeviceToken에 last_error, last_error_at 컬럼 추가
- 실패 토큰 자동 비활성화 (UNREGISTERED, NOT_FOUND, INVALID_ARGUMENT)
This commit is contained in:
2025-12-18 23:01:06 +09:00
parent 81a6dfab5a
commit 10a64fb0a5
9 changed files with 509 additions and 8 deletions

View File

@@ -53,6 +53,19 @@
'ttl' => '86400s', // 24시간
],
/*
|--------------------------------------------------------------------------
| Batch Settings
|--------------------------------------------------------------------------
|
| 대량 발송 시 rate limit 관리 설정
|
*/
'batch' => [
'chunk_size' => env('FCM_BATCH_CHUNK_SIZE', 200), // 한 번에 처리할 토큰 수
'delay_ms' => env('FCM_BATCH_DELAY_MS', 100), // chunk 간 딜레이 (ms)
],
/*
|--------------------------------------------------------------------------
| Logging
@@ -62,4 +75,4 @@
'enabled' => env('FCM_LOGGING_ENABLED', true),
'channel' => env('FCM_LOG_CHANNEL', 'stack'),
],
];
];