You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org> on 2011/09/21 15:29:10 UTC
[jira] [Issue Comment Edited] (CAMEL-4397) add route support for
Hazelcast distributed locking/unlocking
[ https://issues.apache.org/jira/browse/CAMEL-4397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109460#comment-13109460 ]
Sergey Zhemzhitsky edited comment on CAMEL-4397 at 9/21/11 1:29 PM:
--------------------------------------------------------------------
Hi guys,
What do you think about org.apache.camel.spi.RoutePolicy implementation that uses hazelcast to support distributed locking/unloking?
Such a route policy will force the route to run only on a single node in the cluster. Moreover there can be two route policies:
# the first one will create a distributed lock on every incoming exchange and will release the lock when exchange processing completes. This policy will allow to process exchange only on a single node of the cluster at a given time. When exchange processing completes the second node in the cluster will be able to obtain a lock.
# the second route policy will create a distributed lock on route startup, and will release the lock on route shutdown, so the route will run only on a single node in the cluster all the time.
was (Author: szhemzhitsky):
Hi guys,
What do you think about org.apache.camel.spi.RoutePolicy implementation that uses hazelcast to support distributed locking/unloking?
Such a route policy will force the route to run only on a single node in the cluster.
> 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