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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.9.0
    • 3.10.0
    • camel-consul
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: