Håkan Lantz created CAMEL-21892:
-----------------------------------
Summary: Stopped producer in DefaultProducerCache.lastUsedProducer
Key: CAMEL-21892
URL: https://issues.apache.org/jira/browse/CAMEL-21892
Project: Camel
Issue Type: Bug
Components: came-core
Affects Versions: 4.8.3
Reporter: Håkan Lantz
Attachments: DefaultProducerCache.java, DefaultProducerCacheTest.java
We have found that the lastUsedProducer field in
org.apache.camel.support.cache.DefaultProducerCache may reference a stopped
producer that case a java.util.concurrent.RejectedExecutionException if re-used
after stop/start of a route where it is used.
We have found this with a ToDynamicDefinition for a JmsComponent and here is a
unit-test that show this: [^DefaultProducerCacheTest.java]
This can be solved by setting the lastUsedProducer field to null in the
DefaultProducerCache.doStop() method as shown here: [^DefaultProducerCache.java]
We first found this in Apache Camel v4.8.3, however it looks like it's still
the same code in v4.10.2.
Regards,
Håkan.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)