You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by pvillard31 <gi...@git.apache.org> on 2017/08/04 21:12:07 UTC
[GitHub] nifi issue #1987: NIFI-4152 Initial commit of ListenTCPRecord
Github user pvillard31 commented on the issue:
https://github.com/apache/nifi/pull/1987
Hey @bbende, just built this PR and did some tests.
The template I used is here:
https://gist.github.com/pvillard31/5ecea5932bf70fc622e30be8512601b6
Then I send messages using nc:
````
$> nc localhost 9876
2016-11-08 21:24:23,029 FINE Yellow
2016-11-08 21:24:23,029 INFO Test Message 1
2016-11-08 21:24:23,029 WARN Red
2016-11-08 21:24:23,029 ERROR Green
2016-11-08 21:24:23,029 FATAL Blue
...
````
Observations:
- If I start ``nc`` but don't send any message, it'll fail after the read timeout with the following message (and kill my ``nc`` connection):
````
ListenTCPRecord[id=aefaaba3-015d-1000-cecb-dd76899c8193] Error processing records: null: java.net.SocketTimeoutException
````
I'm not sure if we want to raise a bulletin alert if the source is not sending any message. Thoughts?
- If I start ``nc`` and send messages, but less than the maximum number of records per flow file (1000), then it'll generate a flow file only after 30 seconds without receiving any message (and it'll generate a bulletin).
- If I start ``nc`` and keep sending messages, it'll generate flow files containing exactly the number set for the property "record batch size".
While I understand this is the intended behaviour, I'm not sure if this is clear enough in the description of the processor. In particular, raising a bulletin and killing the connection in case no data is received could seem weird (and it's not similar to the way ListenTCP is working).
Instead of killing the connection, what about just generating a flow file with the amount data available at this moment? Or change the level of the log message to info? And probably improve the message to let the user knows that the connection has been closed because no data has been received since X seconds? Thoughts?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---