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

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

[~ijokarumawak], regarding your 
[comment|https://issues.apache.org/jira/browse/NIFI-4169?focusedCommentId=16087053&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16087053].

I think that adding a sendBroadcastMessage() function to WebSocketMessageRouter 
and removing broadcast support from sendMessage() (in the same class) would 
work better.

sendBroadcastMessage() would return a list that PutWebSocket class would use 
find out the session id, Exception, etc. -- for each failed session id. This 
would allow the PutWebSocket class to make better informed decisions about 
cloning the flowfile, what attributes to set (and with what).

It seems to me that just changing the PutWebSocket class, as you suggested, 
would be hiding to much information from itself.




> 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
>            Reporter: Y Wikander
>            Priority: Critical
>              Labels: patch
>         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