Hello all,
I am using the concurrencyconsumers option in the routing. But I have create
a Map which should be shared for thread in the consumer. can any body guide
the sysntax for this . below is the code..
I wanted to use the following deliveryEndpoints map and myRetryBean as one
per thread. but the current code is sharing these accross all.
final Map<String, DeliveryEndpoint> deliveryEndpoints = new
HashMap<String, DeliveryEndpoint>();
RetryBean
myRetryBean=(RetryBean)appContext.getBean("myRetryBean");
myRetryBean.setDeliveryEndpoints(deliveryEndpoints);
final FeedNotificationProcessor processor = new
FeedNotificationProcessor(deliveryEndpoints,
_getFeedBaseUri,
_endpointTakenBaseUri,
_instanceName);
context.addRoutes(new RouteBuilder() {
public void configure() {
from("jms-cif:queue:" +
_notificationQueue+"?concurrentConsumers="+concurrentConsumersSize)
.threads(concurrentConsumersSize)
.process(processor)
.onException(Exception.class).retryUntil(bean("myRetryBean")).end()
.recipientList(header("recipientListHeader").tokenize(","))
.parallelProcessing().executorService(customThreadPoolExecutor)
.aggregationStrategy(new RecipientAggregationStrategy(deliveryEndpoints,
_endpointDeliveredBaseUri))
.to("direct:chunk.completed");
Can any body help me on this.
Regards
Sri
--
View this message in context:
http://old.nabble.com/Handling-map-in-the-concurrentConsumers-tp28707607p28707607.html
Sent from the Camel - Users mailing list archive at Nabble.com.