Alkir Is it possible to use this extension on shared hosting without shh
No. You need access to a running redis instance. This extension is most definitely not for a regular shared hosting environment.
If queueing of the Job fails, the request fails and the user gets direct feedback. If you use something like Sentry you will be notified as well. This erroring is exactly the same behavior with how it works by default in Flarum (called the sync driver). The message now is also still posted, but you will see an error (if I'm not mistaken).
matteocontrini what happens if the Laravel process is for some reason offline?
The job is queued nevertheless. If no workers are running no notifications are send. If you start a worker it will automatically pick up any items in the queue, starting from the oldest.
You can configure redis to persist its state to disk, so that the queue jobs are persisted to disk when redis or the server is restarted!
matteocontrini the queue worker sends the 10 email messages one by one
Queues allow easy scaling. You can run multiple workers at once, even remotely. As long as those remote servers can connect to the redis and database instance and run the same code/configuration. Queues are far more scalable than in-request processing (sync) of notifications.
You can configure this in the worker.
php flarum queue:work --tries=4 will make the worker attempt jobs 4 times.
I can recommend using the fof/sentry package with this extension. This makes it easier to catch any issues with Jobs being processed in the queue.