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

Allow Endpoint to set the key that ProducerCache uses

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.23.0
    • None
    • camel-core
    • Unknown

    Description

      ProducerCache is heavily tied to Endpoint URIs. Using the Endpoint URI as the key to the cache does not allow for the creation of Endpoints with the same URI but different configurations. For example, using a RecipientList to call the same SOAP endpoint but with different SSL certificates isn't currently possible. As the URI is always the same.the ProducerCache will always use the first Endpoint it added to the map even if multiple Endpoints are added to the CamelContext with different keys.

      Adding getProducerCacheKey & setProducerCacheKey methods to the Endpoint interface would allow for setting the key programmatically. ProducerCache.doGetProducer would use the getProducerCacheKey method instead of getEndpointUri.

      DefaultEndpoint would have a new member variable producerCacheKey and could implement the getter such that if the producerCacheKey member was not set it would return getEndpointUri()

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              davisr_uk Richard Davis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: