[ 
https://issues.apache.org/jira/browse/NIFI-16399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18121568#comment-18121568
 ] 

Mike Thomsen commented on NIFI-16399:
-------------------------------------

[~exceptionfactory] I looked into how STOMP and MIME could be implemented for 
this use case, and I think they miss the mark on two key points:

1. They will require the user to buffer the output somewhere before emitting 
headers if an attribute depends on the body.
2. They still require a user to build a process that assumes a particular 
protocol inside stdout which opens up additional complexity for the average 
user.

Putting a temp file for the attributes by comparison is a simple one-and-done. 
It's easy, it can be added to any wrapper quickly and requires no test harness 
beyond setting an environment variable and running the script in the 
developer's terminal to see if the output looks right. It's also easy for 
developers and admins to verify quickly with their preferred language's JSON 
library or something like jq if they're wrapping a command with BASH. It also 
keeps the stdin/stdout behavior as-is which lowers the cognitive burden on 
engineers just wanting to tack on flowfile updates efficiently as the result of 
a process they just shelled out to.

All that said, I definitely see room to improve the PR, but I think the case 
for this architecture is still the strongest.

I think the processor you're proposing makes sense as a separate, more advanced 
option, but as a complement to this rather than a replacement for it.

> Enable attribute updates from ExecuteStreamCommand
> --------------------------------------------------
>
>                 Key: NIFI-16399
>                 URL: https://issues.apache.org/jira/browse/NIFI-16399
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>            Priority: Major
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> This change will create an optional mode where ExecuteStreamCommand will 
> write a temp file to the file system that can be used by the executed command 
> to communicate updates to the flowfile attributes. It will be a flat json 
> document.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to