Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9665

camel-ahc-ws Consumer does not connect

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.16.1
    • Fix Version/s: 2.15.6, 2.16.3, 2.17.0
    • Component/s: camel-ahc-ws
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      WsEndpoint.connect(WsConsumer) should connect to the WebSocket server in case this is not already done.

      The test case (WsProducerConsumerTest.java) only works, since the producer is connecting first and the consumer is using the same connection. If no producer is used, then no connection is created and the consumer will not receive any messages.

      Suggestion:

        void connect(final WsConsumer wsConsumer)
        {
          this.consumers.add(wsConsumer);
      
          if (this.websocket == null || !this.websocket.isOpen())
          {
            this.connect();
          }
        }
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              tom_guenter Thomas G√ľnter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: