title: How to connect celery to rabbitMQ using SSL
body: <p>I'm trying to connect celery with a rabbitMQ broker using SSL certificates.</p>
  
  <p>This is the code:</p>
  
  <pre><code>from celery import Celery
  import ssl
  
  broker_uri = 'amqp://user:pwd@server:5672/vhost'
  
  certs_conf = {
      "ca_certs": "/certs/serverca/cacert.pem",
      "certfile": "/certs/client/rabbit-cert.pem",
      "keyfile": "/certs/client/rabbit-key.pem",
      "cert_reqs": ssl.CERT_REQUIRED
  }
  
  app = Celery('tasks', broker=broker_uri)
  app.conf.update(BROKER_USE_SSL=certs_conf)
  
  app.send_task('task.name', [{'a': 1}])
  </code></pre>
  
  <p>When I try to execute this code i get the following exception:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python36\lib\site-packages\kombu\utils\functional.py", line 36, in __call__
      return self.__value__
  AttributeError: 'ChannelPromise' object has no attribute '__value__'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "test_send_task.py", line 44, in &lt;module&gt;
      app.send_task('task.name', [message])
    File "C:\Python36\lib\site-packages\celery\app\base.py", line 737, in send_task
      amqp.send_task_message(P, name, message, **options)
    File "C:\Python36\lib\site-packages\celery\app\amqp.py", line 558, in send_task_message
      **properties
    File "C:\Python36\lib\site-packages\kombu\messaging.py", line 181, in publish
      exchange_name, declare,
    File "C:\Python36\lib\site-packages\kombu\connection.py", line 494, in _ensured
      return fun(*args, **kwargs)
    File "C:\Python36\lib\site-packages\kombu\messaging.py", line 187, in _publish
      channel = self.channel
    File "C:\Python36\lib\site-packages\kombu\messaging.py", line 209, in _get_channel
      channel = self._channel = channel()
    File "C:\Python36\lib\site-packages\kombu\utils\functional.py", line 38, in __call__
      value = self.__value__ = self.__contract__()
    File "C:\Python36\lib\site-packages\kombu\messaging.py", line 224, in &lt;lambda&gt;
      channel = ChannelPromise(lambda: connection.default_channel)
    File "C:\Python36\lib\site-packages\kombu\connection.py", line 819, in default_channel
      self.ensure_connection()
    File "C:\Python36\lib\site-packages\kombu\connection.py", line 405, in ensure_connection
      callback)
    File "C:\Python36\lib\site-packages\kombu\utils\functional.py", line 333, in retry_over_time
      return fun(*args, **kwargs)
    File "C:\Python36\lib\site-packages\kombu\connection.py", line 261, in connect
      return self.connection
    File "C:\Python36\lib\site-packages\kombu\connection.py", line 802, in connection
      self._connection = self._establish_connection()
    File "C:\Python36\lib\site-packages\kombu\connection.py", line 757, in _establish_connection
      conn = self.transport.establish_connection()
    File "C:\Python36\lib\site-packages\kombu\transport\pyamqp.py", line 130, in establish_connection
      conn.connect()
    File "C:\Python36\lib\site-packages\amqp\connection.py", line 288, in connect
      self.drain_events(timeout=self.connect_timeout)
    File "C:\Python36\lib\site-packages\amqp\connection.py", line 471, in drain_events
      while not self.blocking_read(timeout):
    File "C:\Python36\lib\site-packages\amqp\connection.py", line 477, in blocking_read
      return self.on_inbound_frame(frame)
    File "C:\Python36\lib\site-packages\amqp\method_framing.py", line 55, in on_frame
      callback(channel, method_sig, buf, None)
    File "C:\Python36\lib\site-packages\amqp\connection.py", line 481, in on_inbound_method
      method_sig, payload, content,
    File "C:\Python36\lib\site-packages\amqp\abstract_channel.py", line 128, in dispatch_method
      listener(*args)
    File "C:\Python36\lib\site-packages\amqp\connection.py", line 368, in _on_start
      b", ".join(self.mechanisms).decode()))
  amqp.exceptions.ConnectionError: Couldn't find appropriate auth mechanism (can offer: AMQPLAIN, PLAIN; available: EXTERNAL)
  </code></pre>
  
  <p>Executing the same code without the ssl configuration works just well. What I'm missing?</p>
  
  <p>I can send messages to the broker using pika configured with SSL, but I can't manage to properly configure Celery to send messages to the same broker with SSL.</p>
  
  <p>Thanks in advance.</p>