Created 06-02-2017 09:38 AM
The webhook I am getting data from allows only port 80 to listen to it. I am using Nifi to get events from this webhook and first ListenHttp Processor on port 80 works fine. How do I run more ListenHttp Processors on this same port? is that not possible using diff. base url's? If not, what is the workaround?
Created 06-02-2017 09:48 AM
Hi @Simran Kaur,
That's not possible. However you can do a single ListenHttp followed by a RouteOnAttribute that will route the flow files based on the requested URL (the attribute should be http.request.url).
Hope this helps.
Created 06-02-2017 10:05 AM
Oh, that sounds very nice. Could I find more examples on using RouteOnAttribute ? I looked at the usage and there is not much explanation there.
Created 06-02-2017 10:09 AM
Created 06-02-2017 10:16 AM
and how do I exactly know what the attribute is called? for ex. http.request.url ?
Created 06-02-2017 10:37 AM
Also, I was looking at the attributes of those in queue>
path
restlistener.remote.source.host
filename
restlistener.remote.user.dn
uuid
Why do I not see http.request.url here ? @Pierre Villard
Created 06-02-2017 12:13 PM
You're right, ListenHttp cannot be used as I said... I was thinking about the use of HandleHttpRequest and HandleHttpResponse. With ListenHttp you cannot actually access multiple URLs.
An example could be:
https://pierrevillard.com/2017/01/31/nifi-and-oauth-2-0-to-request-wordpress-api/
Hope this helps.