@@ -91,7 +91,7 @@ void shouldReceiveMapMessages() throws InterruptedException {
91
91
BlockingQueue <MapRecord <String , String , String >> queue = new LinkedBlockingQueue <>();
92
92
93
93
container .start ();
94
- Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::add );
94
+ Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::addAll );
95
95
96
96
subscription .await (DEFAULT_TIMEOUT );
97
97
@@ -119,7 +119,7 @@ void shouldReceiveSimpleObjectHashRecords() throws InterruptedException {
119
119
BlockingQueue <ObjectRecord <String , String >> queue = new LinkedBlockingQueue <>();
120
120
121
121
container .start ();
122
- Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::add );
122
+ Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::addAll );
123
123
124
124
subscription .await (DEFAULT_TIMEOUT );
125
125
@@ -143,7 +143,7 @@ void shouldReceiveObjectHashRecords() throws InterruptedException {
143
143
BlockingQueue <ObjectRecord <String , LoginEvent >> queue = new LinkedBlockingQueue <>();
144
144
145
145
container .start ();
146
- Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::add );
146
+ Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::addAll );
147
147
148
148
subscription .await (DEFAULT_TIMEOUT );
149
149
@@ -168,7 +168,7 @@ void shouldReceiveMessagesInConsumerGroup() throws InterruptedException {
168
168
169
169
container .start ();
170
170
Subscription subscription = container .receive (Consumer .from ("my-group" , "my-consumer" ),
171
- StreamOffset .create ("my-stream" , ReadOffset .lastConsumed ()), queue ::add );
171
+ StreamOffset .create ("my-stream" , ReadOffset .lastConsumed ()), queue ::addAll );
172
172
173
173
subscription .await (DEFAULT_TIMEOUT );
174
174
@@ -194,7 +194,7 @@ void shouldReceiveAndAckMessagesInConsumerGroup() throws InterruptedException {
194
194
195
195
container .start ();
196
196
Subscription subscription = container .receiveAutoAck (Consumer .from ("my-group" , "my-consumer" ),
197
- StreamOffset .create ("my-stream" , ReadOffset .lastConsumed ()), queue ::add );
197
+ StreamOffset .create ("my-stream" , ReadOffset .lastConsumed ()), queue ::addAll );
198
198
199
199
subscription .await (DEFAULT_TIMEOUT );
200
200
@@ -316,7 +316,7 @@ void deserializationShouldContinueStreamRead() throws InterruptedException {
316
316
redisTemplate .opsForStream ().add ("my-stream" , Collections .singletonMap ("payload" , "3" ));
317
317
318
318
container .start ();
319
- Subscription subscription = container .register (readRequest , records ::add );
319
+ Subscription subscription = container .register (readRequest , records ::addAll );
320
320
321
321
subscription .await (DEFAULT_TIMEOUT );
322
322
@@ -347,7 +347,7 @@ void cancelledStreamShouldNotReceiveMessages() throws InterruptedException {
347
347
BlockingQueue <MapRecord <String , String , String >> queue = new LinkedBlockingQueue <>();
348
348
349
349
container .start ();
350
- Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::add );
350
+ Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::addAll );
351
351
352
352
subscription .await (DEFAULT_TIMEOUT );
353
353
cancelAwait (subscription );
@@ -365,7 +365,7 @@ void containerRestartShouldRestartSubscription() throws InterruptedException {
365
365
BlockingQueue <MapRecord <String , String , String >> queue = new LinkedBlockingQueue <>();
366
366
367
367
container .start ();
368
- Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::add );
368
+ Subscription subscription = container .receive (StreamOffset .create ("my-stream" , ReadOffset .from ("0-0" )), queue ::addAll );
369
369
370
370
subscription .await (DEFAULT_TIMEOUT );
371
371
0 commit comments