Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-2519 aligned processor to leverage the subethasmtp threading model #856

Closed
wants to merge 2 commits into from
Closed

Conversation

joewitt
Copy link
Contributor

@joewitt joewitt commented Aug 14, 2016

No description provided.

olegz and others added 2 commits August 14, 2016 01:01
- Removed message queueing which could result in data loss
- Fixed life-cycle issues that coudl put processor in an unstable state
- Fixed PropertyDescriptor translation for Time units and Byte sizes
- Fixed broken tests
- Added additional tests

NIFI-2519 added default for SMTP_MAXIMUM_CONNECTIONS

NIFI-2519 addressed PR comments, polishing
- fixed intermittent deadlock on processor stop and added test for it
- the attributes that can not be extracted from the message but available via MessageContext are written into the outgoing FlowFile
- other minor fixes

NIFI-2519 addressed lates PR comments

NIFI-2519 added better messaging when server closes the connection

NIFI-2519 some polishing and additional tests to validate deadlocks

NIFI-2519 address latest PR comments
fixed deadlock condition for when the consumer is stopped while server is distributing messages
fixed MAX message size issue ensuring it is validated
set max connections to SMTPServer
polished pom
added L&N

NIFI-2519 PR comments
- fixed LICENSE
- Added usage of LimitingInputStream
- simplified SmtpConsumer by removing hasMessage operation
@trixpan
Copy link
Contributor

trixpan commented Aug 14, 2016

👍

Tested manually and also forced some exceptions. ListenSMTP seems to handle errors very well, example:

Place breakpoint on

processSession.getProvenanceReporter().receive(flowFile, "smtp://" + host + ":" + port + "/", watch.getDuration(TimeUnit.MILLISECONDS));

220 bermudatriangle ESMTP Apache NiFi SMTP
helo ,
250 bermudatriangle
mail from: x
250 Ok
rcpt to: y
250 Ok
data
354 End data with <CR><LF>.<CR><LF>
a
.

evaluate flowFile so that is null. Let process continue. Following message is returned.

421 4.3.0 Mail system failure, closing transmission channel
Connection closed by foreign host.

log.error("Unable to fully process input due to " + ex.getMessage(), ex);
throw ex;
} finally {
processSession.rollback(); //make sure this happens no matter what - is safe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joewitt fascinating refactor.

Would you mind explaining why the rollback is used and why it doesn't affect the commit above?

@olegz
Copy link
Contributor

olegz commented Aug 14, 2016

+1

@asfgit asfgit closed this in d3b96dc Aug 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants