# Can the ziti controller broadcast events on websocket connections?

**URL:** <https://openziti.discourse.group/t/can-the-ziti-controller-broadcast-events-on-websocket-connections/4542>\
**Category:** Ziti Overlay\
**Created:** [May 15, 2025, 11:54pm UTC](https://openziti.discourse.group/t/can-the-ziti-controller-broadcast-events-on-websocket-connections/4542 "2025-05-15T23:54:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidanhopper](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/aidanhopper/32/3249_2.png) [@aidanhopper](https://openziti.discourse.group/u/aidanhopper)\
**Post date:** [May 15, 2025, 11:54pm UTC](https://openziti.discourse.group/t/can-the-ziti-controller-broadcast-events-on-websocket-connections/4542/1 "2025-05-15T23:54:55Z")

</div>

Hey everyone,

I'm building an app that needs access to Ziti events from the controller. I can log the events to a file but I'm curious if theres support for broadcasting those events on a web socket connection. It would be easier than writing a server that parses and broadcasts the events myself. Thanks!

---

<div class="post-metadata">

**Author:** ![plorenz](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/plorenz/32/54_2.png) [@plorenz](https://openziti.discourse.group/u/plorenz)\
**Post date:** [May 16, 2025, 12:54am UTC](https://openziti.discourse.group/t/can-the-ziti-controller-broadcast-events-on-websocket-connections/4542/2 "2025-05-16T00:54:17Z")

</div>

Yes, take a look at [ziti/ziti/cmd/fabric/stream\_events.go at main · openziti/ziti · GitHub](https://github.com/openziti/ziti/blob/main/ziti/cmd/fabric/stream_events.go) which is the code implementing `ziti fabric stream events`. That CLI command uses a websocket to stream the events.

Note that the controller doesn't do any caching of events, so if you lose the websocket you can't replay events.

There's also an amqp destination for the event stream. See the [Controller Configuration Reference | OpenZiti](https://openziti.io/docs/reference/configuration/controller/#events)

Paul

---

<div class="post-metadata">

**Author:** ![aidanhopper](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/aidanhopper/32/3249_2.png) [@aidanhopper](https://openziti.discourse.group/u/aidanhopper)\
**Post date:** [May 17, 2025, 7:10pm UTC](https://openziti.discourse.group/t/can-the-ziti-controller-broadcast-events-on-websocket-connections/4542/3 "2025-05-17T19:10:12Z")

</div>

Awesome thanks, it would be really great if the /fabric/v1/ws-api endpoint could be authenticated over a zt-session token.

---

<div class="post-metadata">

**Author:** ![plorenz](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/plorenz/32/54_2.png) [@plorenz](https://openziti.discourse.group/u/plorenz)\
**Post date:** [May 19, 2025, 1:46pm UTC](https://openziti.discourse.group/t/can-the-ziti-controller-broadcast-events-on-websocket-connections/4542/4 "2025-05-19T13:46:05Z")

</div>

That endpoint shares the same authentication mechanisms as the edge apis, so you should be able to use a zt-session token.

Paul

---

<div class="post-metadata">

**Author:** ![aidanhopper](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/aidanhopper/32/3249_2.png) [@aidanhopper](https://openziti.discourse.group/u/aidanhopper)\
**Post date:** [June 29, 2025, 5:27pm UTC](https://openziti.discourse.group/t/can-the-ziti-controller-broadcast-events-on-websocket-connections/4542/5 "2025-06-29T17:27:44Z")

</div>

For anyone curious I was able to get my nodejs app to connect to the same API as the `ziti fabric stream events` command. Here's the [code](https://github.com/aidanhopper/MeshNetMarket/blob/2633f52d9fa456e445284fb56e46c487e9e3911d/publisher/src/ziti-ws.ts).
