[
https://issues.apache.org/jira/browse/NIFI-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976426#comment-15976426
]
ASF GitHub Bot commented on NIFI-3318:
--------------------------------------
Github user ijokarumawak commented on the issue:
https://github.com/apache/nifi/pull/1649
@jdye64 Test with multiple WebSocket clients to receive messages sent from
a NiFi at the same time. Works great, thanks for adding this! I'm +1 with the
functional change, however, I'd like this feature to be documented so that
users will be able to configure PutWebSocket as they want.
Would you update Processor websocket-session-id property docs something
like this? "A NiFi Expression to retrieve the session id. If not specified, a
message will be sent to all connected WebSocket peer for the WebSocket
controller service endpoint."
Thanks!
> Send message from PutWebSocket to all connected clients
> -------------------------------------------------------
>
> Key: NIFI-3318
> URL: https://issues.apache.org/jira/browse/NIFI-3318
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Koji Kawamura
> Assignee: Jeremy Dyer
>
> Currently, PutWebSocket processor needs an incoming flow file having a
> WebSocket session id attribute to tell the NiFi WebSocket server which
> connected client to send a message to.
> A flow explained in this
> [Gist|https://gist.github.com/ijokarumawak/60b9ab2038ef906731ebf4c0eee97176]
> to pull messages from Kafka then send it back to multiple connected clients
> works, but it keeps flow files floating around in the loop, and basically too
> difficult to setup. Also, it imposes unnecessary latency because it needs to
> poll a cache to see if there's new message.
> The list of connected session ids are kept in WebSocket server controller
> service, so it's possible to loop through those sessions in controller
> service without passing a specific session id from PutWebSocket processor.
> PutWebSocket processor can be improved so that it can send messages to every
> connected client.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)