File tree Expand file tree Collapse file tree
src/main/java/com/ject/vs/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import org .springframework .scheduling .concurrent .ThreadPoolTaskExecutor ;
77
88import java .util .concurrent .Executor ;
9+ import java .util .concurrent .ThreadPoolExecutor ;
910
1011@ Configuration
1112@ EnableAsync
@@ -43,4 +44,17 @@ public Executor notificationExecutor() {
4344 executor .initialize ();
4445 return executor ;
4546 }
47+
48+ /** GA4 Measurement Protocol 전송용. 행동 로그는 양이 많아 큐를 넉넉히 두고, 넘치면 버린다(분석 데이터라 유실 허용). */
49+ @ Bean ("analyticsExecutor" )
50+ public Executor analyticsExecutor () {
51+ ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor ();
52+ executor .setCorePoolSize (1 );
53+ executor .setMaxPoolSize (4 );
54+ executor .setQueueCapacity (1000 );
55+ executor .setThreadNamePrefix ("ga-" );
56+ executor .setRejectedExecutionHandler (new ThreadPoolExecutor .DiscardPolicy ());
57+ executor .initialize ();
58+ return executor ;
59+ }
4660}
You can’t perform that action at this time.
0 commit comments