Lehel,

Thank you for the feedback, working on it now.



Thanks,

Keith Denson

703-338-1892 (mobile)

[email protected]

________________________________
From: Lehel Bo?r <[email protected]>
Sent: Thursday, November 9, 2023 7:41 AM
To: [email protected] <[email protected]>
Subject: EXTERNAL - Re: Connect Web Socket and Put Web Socket

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. If you have any doubts please contact IT support.


Hi Keith,

The input FlowFile of the ConnectWebSocket processor is only to set custom HTTP 
headers for the websocket
connection. Currently the following way to can one send messages to a 
WebSocketServer.

ConnectWebSocket -> ReplaceText -> PutWebSocket

The FlowFile on the ConnectWebSocket's processor success relationship contains 
the session id and other identifiers which allows to send messages through the 
session opened by ConnectWebSocket. The ConnectWebSocket processor must be in 
running state when using the PutWebSocket.

Please, check the data flow in this 
article<https://ijokarumawak.github.io/nifi/2016/11/04/nifi-websocket/>.

We see that this is complicated and I'll check if putting the functionality of 
ConnectWebSocket together with PutWebSocket in a new processor would work.

Best Regards,
Lehel
________________________________
From: Keith Denson <[email protected]>
Sent: Wednesday, November 8, 2023 22:16
To: [email protected] <[email protected]>
Subject: Connect Web Socket and Put Web Socket

I have just started using NiFi, so I am a novice and would like the community's 
assistance in helping me solve an issue I am having with my data flow where I 
want to send a binary file to a Python web socket server.

Sending a file to an external web socket server using the following flow:
ListFile->FetchFile->ConnectWebSocket->PutWebSocket.

ListFile->FetchFile->ConnectWebSocket flow is performing as expected, my issue 
is with the ConnectWebSocket->PutWebSocket.  The property settings are 
configured as: follows:

 ConnectWebSocket:
[cid:c7ea1585-c1cc-4ebe-900d-17c26b0f1e32]
PutWebSpcket:
[cid:c23fb424-b040-463e-9b0c-3a39eba15a57]

When I run the flow, I get the following error from the PutWebSocket processor:

ERROR [Timer-Driven Process Thread-9] o.a.n.processors.websocket.PutWebSocket 
PutWebSocket[id=3e1fb6ed-018b-1000-464a-f4fee32cf285] Failed to send message 
via WebSocket due to org.apache.nifi.websocket.WebSocketConfigurationException: 
No WebSocket router is bound with endpointId: translate-documents
nifi  | org.apache.nifi.websocket.WebSocketConfigurationException: No WebSocket 
router is bound with endpointId: translate-documents


Seems the WebSocket Client configured in the ConnectWebSocket processor, 
"translate-documents" is not bound to a WebSocket router.  I have exhausted my 
research without a successful solution.  I also attempted to set my WebSocket 
Client Id to the actual URL endpoint to the web socket server with same results.

Help from the NiFI community would be immensely appreciated.



Thanks,

Keith Denson

703-338-1892 (mobile)

[email protected]


This electronic message transmission contains information from Core4ce which 
may be confidential or privileged. The information is intended to be for the 
use of the individual or entity named above. If you are not the intended 
recipient, be aware that any disclosure, copying, distribution or use of the 
contents of this information is prohibited. If you have received this 
electronic transmission in error, please notify us by telephone (703-496-9433) 
or by electronic mail immediately.

Reply via email to