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

Websocket clients get message from all resources on one port

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.18.4, 2.19.0
    • camel-websocket
    • None
    • Novice

    Description

      Routebuider configuration in which only resource URI is different while port is same.
      1. newsTopic
      2. stockQuoteTopic

      Ideally other clients connecting to newsTopic should get messages published
      on this topic only but they are also getting messages published on stockQuoteTopic.

      On further investigation I found out that memory store used to by sendAll
      is shared by all resource uri for a given port in the server.

      from("activemq:topic:newsTopic").to("websocket://
      0.0.0.0:9090/newsTopic?sendToAll=true");
      from("activemq:topic:stockQuoteTopic").to("websocket://
      0.0.0.0:9090/stockQuoteTopic?sendToAll=true");

      Sample Ouput received from client

      2017-03-06 15:35:15.789:INFO::main: Logging initialized @313ms
      Connected to server

      Message received from server:MSFT [ published on stockQuoteTopic. Expected ..]
      Message received from server:CNBC News [ published on newsTopic. should not have received ]
      Message received from server:BBC News [ published on newsTopic. should not have received ]

      Attachments

        Issue Links

          Activity

            People

              onders Onder Sezgin
              godbolerr@gmail.com Ravi Godbole
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: