Skip to content

Conversation

@glioympas
Copy link
Contributor

@glioympas glioympas commented Sep 11, 2025

Overview

It would be cool to be able to allow dynamic tries configuration on Listeners via a tries() method, like Jobs. Right now it is possible only using tries property. Enabling tries method gives us the flexibility to add more dynamic values ( ex from a config file or based on the Listener's data)

Example

class TestListener implements ShouldQueue { public function tries(): int { return config('myfeature.listener.tries'); } .... 

The above is now allowed and it will propagate the returned tries from the method to the CallQueuedListener.

@glioympas glioympas force-pushed the feat/queued-listener-dynamic-tries branch from 87ad498 to 72a9bc0 Compare September 11, 2025 08:55
@glioympas glioympas changed the title [12.X] Enable dynamic tries() method on Queueable Listeners [12.x] Enable dynamic tries() method on Queueable Listeners Sep 11, 2025
@glioympas glioympas force-pushed the feat/queued-listener-dynamic-tries branch from 72a9bc0 to d4dd7b3 Compare September 11, 2025 11:15
@taylorotwell taylorotwell merged commit 1f8e156 into laravel:12.x Sep 12, 2025
63 checks passed
tegos pushed a commit to tegos/laravel-framework that referenced this pull request Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants