Home > Software engineering >  AMQPS Symfony Messenger and Heroku
AMQPS Symfony Messenger and Heroku

Time:03-05

I’m using CloudAMQP though Heroku’s add-on (https://elements.heroku.com/addons/cloudamqp) with the « Little Lemur » plan. I’m building a PHP Symfony application and I want to connect to AMQP through SSL but it says in the documentation that :

If you want to use TLS/SSL encrypted AMQP, you must also provide a CA certificate. Define the certificate path in the amqp.cacert PHP.ini setting (e.g. amqp.cacert = /etc/ssl/certs) or in the cacert parameter of the DSN (e.g amqps://localhost?cacert=/etc/ssl/certs/). » (https://symfony.com/doc/current/messenger.html#amqp-transport)

My issue is that I have no idea where is located the cacert file on Heroku.

Can you help me with this please ?

CodePudding user response:

I've found the solution, for those who wants to know how to deal with it on Heroku : you need to download the root CA of CloudAMQP (https://www.cloudamqp.com/docs/faq.html#how-do-i-authenticate-the-identity-of-your-server-tls-certificates) and put it in your source code, for example in the public folder.

Then, just set the path in the MESSENGER_DSN env variable like this XXX?cacert=/app/public/cacertfilename.cer

  • Related