Comments inline ...
Markandeya Sarraju wrote:
Hi Guillaume Nodet,
Thanks for the details. I did saw the pipeline component. If what I
understood is correct I can do following
I can have a http binding component, that would route the request to
pipeline, which would call the subsequent components with out involving NMR.
Its kind of hard wiring of the pipeline ( considering we need to code the
calling of components). Is my understanding valid?
The components are not called directly : the pipeline component uses the
NMR to route the exchanges
to the different components. The routing is done in the xml config
file, so you do not have to
code anything.
Also, for in-only components, we can chain any number of components? In this
case , how to we get the response back to first component, letz say http
binder?
That's what i wanted to say in my previous mail : there is no simple
mechanism to perform asynchronous
request / response outside the use of the in-out exchange pattern. An
in-only mep will not have any
response but several lightweight components (those inheriting from
TransformComponentSupport) are able
to handle an incoming in-only request and send the response as another
in-only to another component.
It would have been nice if we can chain in-out components as well.
I'm not sure to understand : the pipeline component uses in-out
exchanges. The response of an in-out exchange
MUST be routed to the consumer. This is really the easiest way to go.
See
http://svn.apache.org/viewcvs.cgi/incubator/servicemix/trunk/servicemix-core/src/test/resources/org/apache/servicemix/components/util/chained-router.xml?view=markup
for an example.
Cheers,
Guillaume Nodet
Regards
Mark
-----Original Message-----
From: Guillaume Nodet [mailto:[EMAIL PROTECTED]
Sent: Monday, January 09, 2006 3:02 PM
To: [email protected]
Subject: Re: [servicemix-user] Pipe line in service mix
You can use the org.apache.servicemix.components.util.PipelineComponent,
which can be used to pipeline multiple components using in-out requests
: each component will receive in input the output of the previous
component in the list.
Another way is to use in-only exchanges and define the destinationXXX
attributes on the activation spec.
Nearly all lightweight components support using in-only for request /
response exchanges : in these cases,
the output is sent in an in-only exchange to the configured
destination. The main problem of such a thing, it that
it will be difficult to do that in a synchronous manner : you will have
to write your own correlation stuff on the first
component so that it will be able to match the response with the
request. You may prefer using the PipilineComponent ...
Cheers,
Guillaume Nodet
Markandeya Sarraju wrote:
All,
Does service mix support a pipeline as follows?
Aè NMRèBèNMRèC and back
Component A receives incoming payload, route to B via NMR, B does some
processing and route to C via NMR with response coming back to A.
The above did not work for me as B send back the response to A instead
of routing to C?
Any alternatives to achieve above?
Thanks
Mark
This message may contain privileged and/or confidential information.
If you receive this message in error or are not the intended
recipient, you may not disseminate this message and you are requested
to erase all copies of this message and attachments.
This message may contain privileged and/or confidential information. If you
receive this message in error or are not the intended recipient, you may not
disseminate this message and you are requested to erase all copies of this
message and attachments.