@@ -26,6 +26,7 @@ public class DefaultEventQueue implements EventQueueIF {
2626 private static final String QUEUE_TIMER_NAME = "queue-timer" ;
2727 private static final Integer DEFAULT_PROCESSING_INTERVAL_IN_SECS = 10 ;
2828 private static final Double BATCH_SIZE_DIVISOR = 1.5 ;
29+ private static final Integer DEFAULT_SUSPENSION_DURATION_IN_MINS = 5 ;
2930
3031 private final StorageProviderIF storageProvider ;
3132 private final Configuration configuration ;
@@ -100,12 +101,10 @@ public void enqueue(Event event) {
100101 }
101102
102103 long timestamp = storageProvider .getQueue ().save (event );
103- String logText =
104- String .format ("type: %s" , event .getType ())
105- + (event .getReferenceId () != null
106- ? String .format (", refId: %s" , event .getReferenceId ())
107- : "" );
108- LOG .info (String .format ("Enqueueing event: %s %s" , timestamp , logText ));
104+ LOG .info (
105+ String .format (
106+ "Enqueueing event: %s type: %s, refId: %s" ,
107+ timestamp , event .getType (), event .getReferenceId ()));
109108 }
110109
111110 private boolean shouldDiscard () {
@@ -245,7 +244,7 @@ private void suspendProcessing(Duration duration) {
245244 public void suspendProcessing (
246245 Duration duration , boolean discardFutureQueueItems , boolean clearQueue ) {
247246 if (duration == null ) {
248- duration = Duration .ofMinutes (5 );
247+ duration = Duration .ofMinutes (DEFAULT_SUSPENSION_DURATION_IN_MINS );
249248 }
250249
251250 LOG .info (String .format ("Suspending processing for %s" , duration ));
0 commit comments