title: Laravel Queue Notifications
body: <p>I have 2 environments, QA (1 webserver) and Prod (2 webservers behind a load balancer) that have been set up the same way using a database queue.</p>
  
  <p>On QA everything works just fine.</p>
  
  <p>On Production, I have some strange behaviour...Mailable works fine using the Queue but an email Notification doesn't work with the queue.</p>
  
  <p>If I remove the queue from the notification, the email gets sent.</p>
  
  <p>On QA, I can see both jobs being created in the jobs table.
  On Prod, only Mailable gets created in the jobs table.</p>
  
  <p>Example with Activation Email:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Notifications;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Notifications\Messages\MailMessage;
  use Illuminate\Notifications\Notification;
  
  class SendActivationEmail extends Notification implements ShouldQueue
  {
      use Queueable;
  
      protected $token;
  
      /**
       * Create a new notification instance.
       *
       * SendActivationEmail constructor.
       * @param $token
       */
      public function __construct($token)
      {
          $this-&gt;token = $token;
          $this-&gt;onQueue('social');
      }
  
      /**
       * Get the notification's delivery channels.
       *
       * @param  mixed  $notifiable
       * @return array
       */
      public function via($notifiable)
      {
          return ['mail'];
      }
  
      /**
       * Get the mail representation of the notification.
       *
       * @param  mixed  $notifiable
       * @return \Illuminate\Notifications\Messages\MailMessage
       */
      public function toMail($notifiable)
      {
          return (new MailMessage)
              -&gt;subject('Activation email')
              -&gt;greeting('xxxxxx - Hello!')
              -&gt;line('You need to activate your email before you can start using all of our services.')
              -&gt;action('Activate Email', route('authenticated.activate', ['token' =&gt; $this-&gt;token]))
              -&gt;line('Thank you for using our application!');
      }
  
      /**
       * Get the array representation of the notification.
       *
       * @param  mixed  $notifiable
       * @return array
       */
      public function toArray($notifiable)
      {
          return [
              //
          ];
      }
  }
  </code></pre>
  
  <p>My .env file:</p>
  
  <pre><code>QUEUE_DRIVER=database
  </code></pre>
  
  <p>The file config/queue.php:</p>
  
  <pre><code>&lt;?php
  
  return [
  
      /*
      |--------------------------------------------------------------------------
      | Default Queue Driver
      |--------------------------------------------------------------------------
      |
      | The Laravel queue API supports a variety of back-ends via an unified
      | API, giving you convenient access to each back-end using the same
      | syntax for each one. Here you may set the default queue driver.
      |
      | Supported: "null", "sync", "database", "beanstalkd",
      |            "sqs", "iron", "redis"
      |
      */
  
      'default' =&gt; env('QUEUE_DRIVER', 'database'),
  
      /*
      |--------------------------------------------------------------------------
      | Queue Connections
      |--------------------------------------------------------------------------
      |
      | Here you may configure the connection information for each server that
      | is used by your application. A default configuration has been added
      | for each back-end shipped with Laravel. You are free to add more.
      |
      */
  
      'connections' =&gt; [
  
          'database' =&gt; [
              'driver' =&gt; 'database',
              'table' =&gt; 'jobs',
              'queue' =&gt; 'default',
              'expire' =&gt; 60,
          ],
  </code></pre>
  
  <p>And my Mailable that works with queue:</p>
  
  <pre><code>Mail::to($user-&gt;email)
                          -&gt;queue(new Welcome($user));
  </code></pre>
  
  <p>Many thanks for your help</p>