Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm currently developing a mashup using Angular 19 and Qlik Sense, and I'm considering whether it's worth migrating from the Capabilities API to the newer qlik-embed approach.
While qlik-embed seems more modern and better aligned with Angular's component-based architecture, there are still a few unclear aspects—particularly around WebSocket management and error handling.
With the Capabilities API:
I can manually manage WebSocket connections (e.g., close them when switching between apps).
I can also intercept server-side errors sent over WebSocket and handle them in the frontend.
My questions are:
How does qlik-embed manage WebSocket connections when switching between apps? Are connections to previously opened apps automatically closed or do they persist?
Is there any mechanism for intercepting and handling WebSocket-level errors (like server timeouts or invalid objects) when using qlik-embed, similar to what the Capabilities API allows?
I'd appreciate any insights or official guidance on how these scenarios are handled with qlik-embed. Thanks in advance!
Hey @amj ,qlik-embed is responsible for render visualizations, and of course, all the apps connected to the visualizations rendered. When qlik-embed component unmounts from the page it will handle all "closing" itself about visualizations.
For managing websockets you should use @qlik/api or enigma.js, with that you can also intercelt websocket errors and other events.
Using both qlik-embed and @qlik/api is the reccommend approach. Per our docs "@qlik/api/qix will re-use existing WebSocket sessions if they are found. It also integrates seamlessly with @qlik/embed libraries and will hook into any WebSocket session already opened by any @qlik/embed library".
Hey @amj ,qlik-embed is responsible for render visualizations, and of course, all the apps connected to the visualizations rendered. When qlik-embed component unmounts from the page it will handle all "closing" itself about visualizations.
For managing websockets you should use @qlik/api or enigma.js, with that you can also intercelt websocket errors and other events.
Using both qlik-embed and @qlik/api is the reccommend approach. Per our docs "@qlik/api/qix will re-use existing WebSocket sessions if they are found. It also integrates seamlessly with @qlik/embed libraries and will hook into any WebSocket session already opened by any @qlik/embed library".