camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: Does it make sense to use a transactional client in this config ?
Date Tue, 12 May 2009 11:51:24 GMT
+1

I will try this on Apache Karaf/ServiceMix

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Tue, May 12, 2009 at 1:34 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> On Tue, May 12, 2009 at 1:30 PM, Charles Moulliard <cmoulliard@gmail.com>
> wrote:
> > So the route + spring have to be declared like this :
> Yes but you need to set the policy/transacted as well in the route, so
> Camel knows it is a TX route.
>
> >
> > from(jms endpoint) (TX)
> .policy(required) if Camel 1.x
> .transacted() if Camel 2.0-SNAPSHOT
> > .convertBodyTo()
> > .transform()
> > .to(bean service updating in the DB) (TX)
> > .to(jms endpoint) (TX)
> >
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> >
> >
> > On Tue, May 12, 2009 at 12:51 PM, Claus Ibsen <claus.ibsen@gmail.com>
> wrote:
> >
> >> On Tue, May 12, 2009 at 10:13 AM, Charles Moulliard
> >> <cmoulliard@gmail.com> wrote:
> >> > Hi,
> >> >
> >> > I would like to have the point of view of the camel users about the
> >> > pertinence to use or not the EIP transactional client.
> >> >
> >> > Here is the case that I'm investigating : "Messages placed in a queue
> A
> >> will
> >> > be processed in a routing slip pattern. At the end of the route, we
> will
> >> > call a bean service to insert/update data in a DB. If the messages
> have
> >> been
> >> > inserted/updated in the DB, then they can be placed in a queue B. So,
> my
> >> > bean service must be configured to be part of a transaction. If we
> have a
> >> > commit, then the messages can be placed in a queue, otherwise no. If a
> >> > rollback occurs, it means that the messages must not be removed from
> the
> >> > queue A or placed in error queue to check why information they contain
> >> > cannot be inserted in the DB"
> >>
> >> Yeah you need TX to support ACID for doing JMS consume + DB insert +
> >> JMS produce.
> >> If the opreation failed the message will be rolledback to the original
> >> JMS queue and the DB operation is not committed either.
> >>
> >> Beware that if a message cannot be processed at all it will redeliver
> >> forever. So you need to configure the JMS broker
> >> to handle redeliver and after X attempts move the message to a DLQ.
> >>
> >>
> >> >
> >> > Regards,
> >> >
> >> > Charles Moulliard
> >> > Senior Enterprise Architect
> >> > Apache Camel Committer
> >> >
> >> > *****************************
> >> > blog : http://cmoulliard.blogspot.com
> >> >
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> Apache Camel Committer
> >>
> >> Open Source Integration: http://fusesource.com
> >> Blog: http://davsclaus.blogspot.com/
> >> Twitter: http://twitter.com/davsclaus
> >> Apache Camel Reference Card:
> >> http://refcardz.dzone.com/refcardz/enterprise-integration
> >> Interview with me:
> >>
> >>
> http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=7893-progress
> >>
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> Apache Camel Reference Card:
> http://refcardz.dzone.com/refcardz/enterprise-integration
> Interview with me:
>
> http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=7893-progress
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message