[ https://issues.apache.org/jira/browse/CAMEL-4397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109638#comment-13109638 ]
Ben O'Day commented on CAMEL-4397: ---------------------------------- hey Sergey, what you described is CAMEL-4454...using a RoutePolicy/Hazelcast seems to make the most sense there. My use case is slightly different. We have data (Orders, etc) that is modified in multiple routes and also by POJOs in other apps. I was hoping to leverage Hazelcast to manage the distributed Lock on this data (to prevent stale read/writes, etc) regardless of where the Lock was created. So, my approach was to create the Lock on specific Exchange data (OrderID) based on an Expression. Also, I don't want to stop the route consumer altogether, but only block the threads processing specific data (based on OrderID) to allow the route to continue processing other data (other Orders) to preserve processing throughput. That being said, perhaps this should be done with a RoutePolicy (or is overambitious altogether). I was just trying to leverage the existing camel-hazelcast component since it seemed to fit there...I'll give it some more thought. > add route support for Hazelcast distributed locking/unlocking > ------------------------------------------------------------- > > Key: CAMEL-4397 > URL: https://issues.apache.org/jira/browse/CAMEL-4397 > Project: Camel > Issue Type: Improvement > Components: camel-hazelcast > Reporter: Ben O'Day > Assignee: Ben O'Day > Priority: Minor > Fix For: 2.9.0 > > Attachments: CAMEL-4397.patch > > > add support for Hazelcast distributed locking/unlocking APIs in a route...see > http://www.hazelcast.com/documentation.jsp#Lock > something like this... > {code} > from("seda:lockTest") > .doTry() > .setHeader(HazelcastConstants.LOCK_OBJECT, simple("ID-${header.id}")) > .to("hazelcast:lock") > .setBody(simple("processed[${body}]")) > .to("mock:mock") > .doFinally() > .to("hazelcast:unlock"); > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira