Support Questions
Find answers, ask questions, and share your expertise

NIFI ConsumeAMQP / TLS / AMQPS

New Contributor

With NIFI 1.7.0 (windows 10, jre8) i'm trying to consume message from CloudAMPQ using AMQPS (amqp / tls)

My URI is : amqps://xmabtrto:xxxxxxxxxx@sheep.rmq.cloudamqp.com/xmabtrto

  • With processor executeScript + groovy : OK (but i do not pool connection, so it is low-perf...)
  • With processor ConsumeAMQP : KO Bulletin : Failed to establish connection with AMQP Broker: com.rabbitmq.client.ConnectionFactory@2a835d25;

My ConsumeAMQP settings are :

  • host : sheep.rmq.cloudamqp.com
  • virtualhost : xmabtrto
  • user : xmabtrto
  • port : 5671 (5672 works since it is plain amqp).
  • SSL Context Service : no value
  • Use Certificate Authentication : false
  • Client Auth : REQUIRED

I've tried using an SSL Context generated by the toolkit but it doesn't work neither (and i don't want to auth with cert).

Working executeScript groovy code :

import com.rabbitmq.client.*
import org.apache.commons.io.IOUtils
import java.nio.charset.*

def factory = new ConnectionFactory();
factory.setUri("amqps://xmabtrto:xxxxxxxxxx@sheep.rmq.cloudamqp.com/xmabtrto");
def conn = factory.newConnection();
def channel = conn.createChannel()
//...
channel.close()
conn.close()

Any idea how to make ConsumeAMQP works with amqps ?

1 REPLY 1

New Contributor

Solved : i had to import cloudamqp cert (.cer) inside a JKS trustore, referenced in the SSL Context.

; ;