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

Y Wikander commented on NIFI-4169:
----------------------------------

I think that it might be a bit more than I planned on chewing.

Looking at PutFTP, PutSFTP, PublishAMQP, PublishMQTT they all use 'failure' as 
a "can't send to the destination". And it's what the non-broadcasting section 
of the processor does. What makes broadcasting different?
In practice, would one really be broadcasting to a list that contained more 
than one? As this part I'm hazy on. When does a list come into play?


Re the code comments:
1. From testing; the list becomes empty for a while, before it's added to 
again. I presumed that the ConnectWebSocket closed the session after it's 
timeout interval, then opened it up again. Such that some flowfiles routed to 
'success' even though they never were sent (because the for loop had nothing to 
do).
2. I could imagine trying to send to as many WebSocketSession entries that it 
could, and cache up different Exceptions. But then you have to pick which 
single Exception is more exceptional to report back.
And, back to my question, would one really be broadcasting to a list under 
normal circumstances?

> PutWebSocket processor with blank WebSocket session id attribute cannot 
> transfer to failure queue
> -------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-4169
>                 URL: https://issues.apache.org/jira/browse/NIFI-4169
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Y Wikander
>            Priority: Critical
>              Labels: patch
>             Fix For: 1.3.0, 1.4.0
>
>         Attachments: 
> 0001-websocket-when-sendMessage-fails-under-blank-session.patch
>
>
> If a PutWebSocket processor is setup with a blank WebSocket session id 
> attribute (see NIFI-3318; Send message from PutWebSocket to all connected 
> clients) and it is not connected to a websocket server it will log the 
> failure and mark the flowfile with Success (rather than Failure) -- and the 
> data is effectively lost.
> If there are multiple connected clients, and some succeed and others fail, 
> routing Failure back into the PutWebSocket could result in duplicate data to 
> some clients.
> Other NiFi processors seem to err on the side of "at least once".



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to