Support Questions

Find answers, ask questions, and share your expertise

Invalid upstream connection for MQTT in Nifi

avatar
Expert Contributor

Hi,

I installed mosquitto on hdf and it is running now. Now i am trying to call publishMQTT and receive the messages from broker but it gives me "upstream connections is invalid because processor requires an upstream connection but currently has none".

Please note the i also open the firewall rules and can do telnet to the broker URL too.

Please find the attached processor config.

Thanks,

SJuntitled.png

1 ACCEPTED SOLUTION

avatar
Guru

Hi @Sanaz Janbakhsh,

PublishMQTT is a processor that requires an incoming relationship. Basically, something has to be coming in to it to publish to a broker. That is why you are getting the "upstream connections is invalid..." message.

It sounds like you need to use the ConsumeMQTT processor which receives messages from an MQTT broker.

If I am misunderstanding your use case, please post a screenshot of your flow if possible.

View solution in original post

3 REPLIES 3

avatar
Guru

Hi @Sanaz Janbakhsh,

PublishMQTT is a processor that requires an incoming relationship. Basically, something has to be coming in to it to publish to a broker. That is why you are getting the "upstream connections is invalid..." message.

It sounds like you need to use the ConsumeMQTT processor which receives messages from an MQTT broker.

If I am misunderstanding your use case, please post a screenshot of your flow if possible.

avatar
New Contributor

what about "PostHttp" processor ?? it always showing me the error Upstream connection is invalid! any help please 

avatar
Expert Contributor

Hi Andrew,

I've tried consumeMQTT too but the clientId was the issue. Thanks for your help.

SJ