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

camel-consul - Consul catalog action "LIST_SERVICES" calls CatalogClient.getNodes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.9.0
    • Fix Version/s: 3.10.0
    • Component/s: camel-consul
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Probably a copy-paste error in ConsulCatalogProducer. The handler for LIST_SERVICES calls getNodes:

      @InvokeOnHeader(ConsulCatalogActions.LIST_NODES)
      protected void listNodes(Message message) throws Exception {
          processConsulResponse(message, getClient().getNodes(buildQueryOptions(message, getConfiguration())));
      }
      
      @InvokeOnHeader(ConsulCatalogActions.LIST_SERVICES)
      protected void listServices(Message message) throws Exception {
          processConsulResponse(message, getClient().getNodes(buildQueryOptions(message, getConfiguration())));
      --------------------------------------------------^^^^
      }

       Should call getServices(queryOptions) instead.

       

      Workaround: use

      .to("consul:agent?action=SERVICES") 

      But that doesn't give you the node name where existing services are registered

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dschulten Dietrich Schulten
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: