Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5561

ZK Websocket Quarkus compatibility

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Normal Normal
    • 10.0.0
    • 10.0.0, 9.6.5
    • None

      User Story

      As an developer, I want to use the ZK websocket and WebsocketServerPush in a Quarkus application.

      Acceptance Criteria

      Adding the WebsocketWebappInit to enable similar WS support as other environments

      Details

      Multiple failure points currently:

      Quarkus appear to not trigger the WebsocketFilter, even though it is registered in the WebappInit

      Quarkus wraps websocket requests in its own io.undertow.websockets.vertx.VertxWebSocketHttpExchange which always returns null when prompted for session, which means that no session is ever retrieved from Quarkus

       

      Additional config info

      In Quarkus / undertow, zk.xml must be deployed under src/main/resources/metainfo/zk/zk.xml

      Quarkus / undertow doesn't start WS unless a WS config exist in Java code (not created during WebAppInit), so need to create a Dummy class (attached EnableWebsocket class) to enable WS support

      Quarkus require a specific extra library to support WS

      enable with quarkus command or in pom directly with 

      		<dependency>
      		    <groupId>io.quarkus</groupId>
      		    <artifactId>quarkus-websockets</artifactId>
      		</dependency>
      

            rebeccalai rebeccalai
            MDuchemin MDuchemin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: