Richard Davis created CAMEL-12989:
-------------------------------------
Summary: Allow Endpoint to set the key that ProducerCache uses
Key: CAMEL-12989
URL: https://issues.apache.org/jira/browse/CAMEL-12989
Project: Camel
Issue Type: Improvement
Components: camel-core
Affects Versions: 2.23.0
Reporter: Richard Davis
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()
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)