You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by mart <ma...@googlemail.com> on 2006/11/21 15:40:59 UTC
Ideas needed
Hello
I am wondering how to make my flow being reliable, or in other words make
that a message that is NEVER lost within the bus, whatever the status of
other components.
JCA flow seems restricted to some components (which ones?).
My flows handle file transfer (vfs, file, ftp, whatever), drools
(properties) & EIP Content based routing (xpath), transformComponent, http
(jetty), mail. In every case message are created from data read from a file
system, except http where I send XML data from a Java application that
executes a post of an XML file to the HTTP component.
I understand that a file system writing/reading operations are not
transactional thus it seems difficult to handle transaction. However what is
the maximum reliability ServiceMix can offer in my case?
ATM, messages could be lost because the final destination is not reachable,
or on other component failure and the risk is far too high for us to use
servicemix as a product in production if it appears messages can be lost
inside the bus.
Thanks for any suggestions!
--
View this message in context: http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7472416
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Ideas needed
Posted by Guillaume Nodet <gn...@gmail.com>.
On 11/21/06, Christian Schneider <ch...@die-schneider.net> wrote:
> Perhaps this can also be combined with spring transaction support.
> When you mark a method transactional in spring the transaction is
> automatically
> rolled back when an exception occurs.
But spring transactions can not be used with JBI components directly,
like a servicemix-http provider endpoint. In this case, if the target web
service is not available, an error will be returned in the jbi exchange, and
there's no easy way to rollback the transaction. I will add soon a
flag on the jms/jca consumer endpoint, so that it rollback the transaction
if the exchange is in error. This should cover at least this case.
>
> This way you would simply have to let transactions pop up unhandled or
> throw your own runtime
> exceptions when something happens. Of course your own actions on the
> filesystem won´t be rolled back...
>
> To Guillaume: Can spring declarative transactions be used with jca flows?
Yes, provided that you use a compatible transaction manager.
ServiceMix 3.1 uses Jencks 2.0 which provides a TransactionManager
which implement the spring PlatformTransactionManager, so that there is nothing
more to configure.
>
> Christian
>
> Guillaume Nodet schrieb:
>
> > One way to do that, is to persist incoming requests using a jms binding.
> > Then you can use a jca consumer and make sure your transaction is
> > rolled back if something bad occur (this is the hard part).
> > Thus, you will reduce the points of failures to the protocol bridge
> > between http/jms or ftp/jms.
> >
> > On 11/21/06, mart <ma...@googlemail.com> wrote:
> >
> >>
> >> Hello
> >>
> >> I am wondering how to make my flow being reliable, or in other words
> >> make
> >> that a message that is NEVER lost within the bus, whatever the status of
> >> other components.
> >>
> >> JCA flow seems restricted to some components (which ones?).
> >>
> >> My flows handle file transfer (vfs, file, ftp, whatever), drools
> >> (properties) & EIP Content based routing (xpath), transformComponent,
> >> http
> >> (jetty), mail. In every case message are created from data read from
> >> a file
> >> system, except http where I send XML data from a Java application that
> >> executes a post of an XML file to the HTTP component.
> >>
> >> I understand that a file system writing/reading operations are not
> >> transactional thus it seems difficult to handle transaction. However
> >> what is
> >> the maximum reliability ServiceMix can offer in my case?
> >>
> >> ATM, messages could be lost because the final destination is not
> >> reachable,
> >> or on other component failure and the risk is far too high for us to use
> >> servicemix as a product in production if it appears messages can be lost
> >> inside the bus.
> >>
> >> Thanks for any suggestions!
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7472416
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
>
--
Cheers,
Guillaume Nodet
Re: Ideas needed
Posted by Christian Schneider <ch...@die-schneider.net>.
Perhaps this can also be combined with spring transaction support.
When you mark a method transactional in spring the transaction is
automatically
rolled back when an exception occurs.
This way you would simply have to let transactions pop up unhandled or
throw your own runtime
exceptions when something happens. Of course your own actions on the
filesystem won´t be rolled back...
To Guillaume: Can spring declarative transactions be used with jca flows?
Christian
Guillaume Nodet schrieb:
> One way to do that, is to persist incoming requests using a jms binding.
> Then you can use a jca consumer and make sure your transaction is
> rolled back if something bad occur (this is the hard part).
> Thus, you will reduce the points of failures to the protocol bridge
> between http/jms or ftp/jms.
>
> On 11/21/06, mart <ma...@googlemail.com> wrote:
>
>>
>> Hello
>>
>> I am wondering how to make my flow being reliable, or in other words
>> make
>> that a message that is NEVER lost within the bus, whatever the status of
>> other components.
>>
>> JCA flow seems restricted to some components (which ones?).
>>
>> My flows handle file transfer (vfs, file, ftp, whatever), drools
>> (properties) & EIP Content based routing (xpath), transformComponent,
>> http
>> (jetty), mail. In every case message are created from data read from
>> a file
>> system, except http where I send XML data from a Java application that
>> executes a post of an XML file to the HTTP component.
>>
>> I understand that a file system writing/reading operations are not
>> transactional thus it seems difficult to handle transaction. However
>> what is
>> the maximum reliability ServiceMix can offer in my case?
>>
>> ATM, messages could be lost because the final destination is not
>> reachable,
>> or on other component failure and the risk is far too high for us to use
>> servicemix as a product in production if it appears messages can be lost
>> inside the bus.
>>
>> Thanks for any suggestions!
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7472416
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
Re: Ideas needed
Posted by mart <ma...@googlemail.com>.
Trying to make a jms bridge between my components and using a binaryfile
marshaler at src/dest I have the following error:
error: javax.jbi.messaging.MessagingException: No output name available.
Cannot output message!
]
java.lang.UnsupportedOperationException: A destination must be specified.
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
at
org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.process(MultiplexingConsumerProcessor.java:117)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:479)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:461)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
DEBUG - DeliveryChannelImpl - Send
ID:w10210-3226-1164878007890-8:5 in DeliveryChannel{servicemix-jms}
DEBUG - DeliveryChannelImpl - Sent: InOnly[
id: ID:w10210-3226-1164878007890-8:5
status: Error
role: consumer
service: {http://servicemix.org/cheese}myFTPServer_actes
endpoint: myFTPServer_actes
in: <?xml version="1.0" encoding="UTF-8"?><content id="bouh">
<dummy>Dummy Content for JBI Message</dummy>
</content>
mart wrote:
>
> Thanks. I need more precise info on what you are talking about. Let's make
> it simple: FTP source to FTP destination transfer, and I want servicemix
> to keep the message until FTP destination is available.
>
> So I what component do I need to use? FTP => JMS => FTP with persistence
> may be enough or not? how do I use the JCA consumer you are talking about?
> What would it really do?
>
>
> thanks again
>
> martin
>
>
> gnodet wrote:
>>
>> One way to do that, is to persist incoming requests using a jms binding.
>> Then you can use a jca consumer and make sure your transaction is
>> rolled back if something bad occur (this is the hard part).
>> Thus, you will reduce the points of failures to the protocol bridge
>> between http/jms or ftp/jms.
>>
>> On 11/21/06, mart <ma...@googlemail.com> wrote:
>>>
>>> Hello
>>>
>>> I am wondering how to make my flow being reliable, or in other words
>>> make
>>> that a message that is NEVER lost within the bus, whatever the status of
>>> other components.
>>>
>>> JCA flow seems restricted to some components (which ones?).
>>>
>>> My flows handle file transfer (vfs, file, ftp, whatever), drools
>>> (properties) & EIP Content based routing (xpath), transformComponent,
>>> http
>>> (jetty), mail. In every case message are created from data read from a
>>> file
>>> system, except http where I send XML data from a Java application that
>>> executes a post of an XML file to the HTTP component.
>>>
>>> I understand that a file system writing/reading operations are not
>>> transactional thus it seems difficult to handle transaction. However
>>> what is
>>> the maximum reliability ServiceMix can offer in my case?
>>>
>>> ATM, messages could be lost because the final destination is not
>>> reachable,
>>> or on other component failure and the risk is far too high for us to use
>>> servicemix as a product in production if it appears messages can be lost
>>> inside the bus.
>>>
>>> Thanks for any suggestions!
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7472416
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7616267
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Ideas needed
Posted by mart <ma...@googlemail.com>.
Thanks. I need more precise info on what you are talking about. Let's make it
simple: FTP source to FTP destination transfer, and I want servicemix to
keep the message until FTP destination is available.
So I what component do I need to use? FTP => JMS => FTP with persistence may
be enough or not? how do I use the JCA consumer you are talking about? What
would it really do?
thanks again
martin
gnodet wrote:
>
> One way to do that, is to persist incoming requests using a jms binding.
> Then you can use a jca consumer and make sure your transaction is
> rolled back if something bad occur (this is the hard part).
> Thus, you will reduce the points of failures to the protocol bridge
> between http/jms or ftp/jms.
>
> On 11/21/06, mart <ma...@googlemail.com> wrote:
>>
>> Hello
>>
>> I am wondering how to make my flow being reliable, or in other words make
>> that a message that is NEVER lost within the bus, whatever the status of
>> other components.
>>
>> JCA flow seems restricted to some components (which ones?).
>>
>> My flows handle file transfer (vfs, file, ftp, whatever), drools
>> (properties) & EIP Content based routing (xpath), transformComponent,
>> http
>> (jetty), mail. In every case message are created from data read from a
>> file
>> system, except http where I send XML data from a Java application that
>> executes a post of an XML file to the HTTP component.
>>
>> I understand that a file system writing/reading operations are not
>> transactional thus it seems difficult to handle transaction. However what
>> is
>> the maximum reliability ServiceMix can offer in my case?
>>
>> ATM, messages could be lost because the final destination is not
>> reachable,
>> or on other component failure and the risk is far too high for us to use
>> servicemix as a product in production if it appears messages can be lost
>> inside the bus.
>>
>> Thanks for any suggestions!
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7472416
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context: http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7615720
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Ideas needed
Posted by Guillaume Nodet <gn...@gmail.com>.
One way to do that, is to persist incoming requests using a jms binding.
Then you can use a jca consumer and make sure your transaction is
rolled back if something bad occur (this is the hard part).
Thus, you will reduce the points of failures to the protocol bridge
between http/jms or ftp/jms.
On 11/21/06, mart <ma...@googlemail.com> wrote:
>
> Hello
>
> I am wondering how to make my flow being reliable, or in other words make
> that a message that is NEVER lost within the bus, whatever the status of
> other components.
>
> JCA flow seems restricted to some components (which ones?).
>
> My flows handle file transfer (vfs, file, ftp, whatever), drools
> (properties) & EIP Content based routing (xpath), transformComponent, http
> (jetty), mail. In every case message are created from data read from a file
> system, except http where I send XML data from a Java application that
> executes a post of an XML file to the HTTP component.
>
> I understand that a file system writing/reading operations are not
> transactional thus it seems difficult to handle transaction. However what is
> the maximum reliability ServiceMix can offer in my case?
>
> ATM, messages could be lost because the final destination is not reachable,
> or on other component failure and the risk is far too high for us to use
> servicemix as a product in production if it appears messages can be lost
> inside the bus.
>
> Thanks for any suggestions!
>
> --
> View this message in context: http://www.nabble.com/Ideas-needed-tf2679182s12049.html#a7472416
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet