File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -27,22 +27,22 @@ public function aroundReject(
27
27
QueueInterface $ subject ,
28
28
callable $ proceed ,
29
29
EnvelopeInterface $ envelope ,
30
- bool $ requeue ,
31
- string $ error
30
+ bool $ requeue = true ,
31
+ string $ rejectionMessage = null
32
32
): void {
33
- if (!$ error ) {
34
- $ proceed ($ envelope , $ requeue , $ error );
33
+ if (!$ rejectionMessage ) {
34
+ $ proceed ($ envelope , $ requeue , $ rejectionMessage );
35
35
return ;
36
36
}
37
37
38
38
$ shouldBeSavedForRetry = $ this ->isMessageShouldBeSavedForRetryService ->execute ($ envelope );
39
39
40
40
if (!$ shouldBeSavedForRetry ) {
41
- $ proceed ($ envelope , $ requeue , $ error );
41
+ $ proceed ($ envelope , $ requeue , $ rejectionMessage );
42
42
return ;
43
43
}
44
44
45
- $ this ->saveFailedMessageService ->execute ($ envelope , $ error );
45
+ $ this ->saveFailedMessageService ->execute ($ envelope , $ rejectionMessage );
46
46
$ subject ->acknowledge ($ envelope );
47
47
}
48
48
}
You can’t perform that action at this time.
0 commit comments