no analogue for pika.SSLOptions in aio_pika

63 views Asked by At

I want to move from pika to aio-pika. So, my project uses ssl and I specify ssl-related settings in pika.SSlOptions class. Firstly I create ssl.SSLContext instance and specify CA, certfile, keyfile and password for certificate. Then I use SSLContext variable to create pika.SSLOptions instance, that takes 2 parameters: SSLContext instance and server_hostname. After that I use created SSLOptions instance to create ConnectionParameters and connect to rabbitmq. I have 2 questions:

  • why aio_pika.connect_robust takes two ssl-related arguments: ssl_options and ssl_context, but pika.ConnectionParameters takes only ssl_options
  • how to specify server hostname using aio-pika

I looked through the source code of aio-pika, looked a lot in google

0

There are 0 answers