#542 - Polishing.

Increment received count before adding result to queue to allow for improved synchronization.
This commit is contained in:
Mark Paluch
2019-11-11 15:44:36 +01:00
parent 481eb57aec
commit 8038eb7cad

View File

@@ -24,6 +24,7 @@ import org.springframework.data.redis.stream.StreamListener;
/**
* @author Christoph Strobl
* @author Mark Paluch
*/
public class CapturingStreamListener implements StreamListener<String, MapRecord<String, String, String>> {
@@ -36,8 +37,8 @@ public class CapturingStreamListener implements StreamListener<String, MapRecord
@Override
public void onMessage(MapRecord<String, String, String> record) {
deque.add(record);
counter.incrementAndGet();
deque.add(record);
}
/**