On 7/24/07, Paul Fremantle <[EMAIL PROTECTED]> wrote:
Rajith
This looks really cool.... at the moment I guess this would have to be
integrated into QPid only.
[RA] Yes basically Synapse is used as a Sepcialized Exchange in the
AMQP broker that does message transformations and content based routing.
I will write a blog post soon about the use cases. The effort spent on
integration was so little, I was initially suprised how quickly I was able
to get this working.
It's a good testament to the adaptability and flexibility of synapse.
If we could get it to work with both QPid
and other transports too then it would fit better as part of Synapse.
[RA] Paul in this case Qpid (AMQP) was not used as a transport.
Rather it was the environment on which synapse ran. Simillar to synapse on
top of Axis2.
Any ideas how we could expand it out a bit?
[RA] I will do an AMQP transport when the code base stabilizes a bit after
the 0-10 release.
Paul
On 7/24/07, Rajith Attapattu <[EMAIL PROTECTED]> wrote:
> Yes the impl is customized for Qpid --> Qpid routing.
> But it can be pointed out as an example for using synapse in other
> environments.
>
> The generic JBI SE (disscussed above by Michale) can be put in the
synapse
> code base.
> so we have a good example in the code base itself.
>
> Regards,
>
> Rajith
>
>
> On 7/24/07, Paul Fremantle <[EMAIL PROTECTED] > wrote:
> >
> > Cool Rajith! How can we get this code a bit more available for Synapse
> > users? Are you restricted to only QPID->QPID routing with this?
> >
> > Paul
> >
> > On 7/24/07, Rajith Attapattu <[EMAIL PROTECTED]> wrote:
> > > Paul & Michael,
> > >
> > > Thats exactly how I used synapse in Qpid.
> > > To do CBR and Transformation of messages. It was done in a few
simple
> steps,
> > > largely due to the way synapse is designed.
> > > Synapse does have a rich set of features that can be utilized
outside of
> > > it's primary domain. (primary domain as in WS mediation).
> > >
> > > Here are a few ideas (I have to warn, that I only had a cursory
glance
> at
> > > the JBI spec)
> > > These are based on my experiance with the Qpid integration.
> > >
> > > You synapse Service component in the JBI container can convert from
the
> > > javax.jbi.messaging.NormalizedMessage to the synapse
> > > MessageContext.
> > > You could then feed the message context to the synapse engine. It
will
> do
> > > transformation and/or CBR
> > > Then you could take the message context and convert it back to a
> > > javax.jbi.messaging.NormalizedMessage.
> > > Now it can be handed back to the JBI container. The new NM message
> context
> > > will now have new routing information and/or a transformed payload.
> > >
> > > I broke it down to two steps to, so that I can easily type
> > > NM = Normalized message
> > > SC = Synapse Message Context
> > >
> > > JBIContainer ------NM-------> Synapse Component ----SC------->
Synapse
> > > Engine
> > >
> > > Synapse Engine ----SC-------> Synapse Component -----NM----->
> JBIContainer.
> > >
> > >
> > >
> > > Your component can implement the SynapseEnvironment interface and in
the
> > > send method you can convert the message context in to a NM and hand
over
> to
> > > the JBI container.
> > > Here is the code I used for Qpid and demonstrates the idea.
> > >
> > > public void send(EndpointDefinition endpoint, MessageContext smc)
> > > {
> > > if(endpoint != null)
> > > {
> > > smc.setTo(new EndpointReference(endpoint.getAddress()));
> > > AMQMessage newMessage =
> > > MessageContextCreatorForQpid.getAMQMessage
> > > (smc);
> > > try
> > > {
> > >
> qpidExchange.getExchangeRegistry().routeContent(newMessage);
> > > }
> > > catch(Exception e)
> > > {
> > > throw new SynapseException("Faulty endpoint",e);
> > > }
> > > }
> > >
> > > }
> > >
> > > You can find the complete code at,.
> > >
>
https://svn.apache.org/repos/asf/incubator/qpid/branches/client_restructure/java/broker/src/main/java/org/apache/qpid/server/exchange/synapse/
> > >
> > > Regards,
> > >
> > > Rajith
> > >
> > >
> > > On 7/23/07, Michael Buchholz < [EMAIL PROTECTED]> wrote:
> > > > Paul
> > > >
> > > > I search for a sub-topic of my master thesis about Web-Service
> Mediation
> > > > Systems. After reading the JBI spec I had the idea that a WMS
> (Synapse)
> > > > could be used as a CBR in JBI-Enviroments:
> > > >
> > > > The Normalized Message Router (NMR) does not provide content based
> > > > routing (CBR). Each component (Service Enging / Binding Component)
> > > > referres another component by service endpoint, name or interface.
> That
> > > > means each component has its own routing logic included. Also the
> > > > component that sends the normalized message to the NMR must make
sure
> > > > that the normalized message payload is understood by the
referenced
> > > > component. (if i got the specs right)
> > > >
> > > > Synapse could provide a more convenient method to route messages
by
> > > > providing CBR to a JBI enviroment.
> > > >
> > > > For this each component registered on the NMR could forward its
> > > > normalized message (NM) to the Synapse-Service Engine. Synapse can
now
> > > > select the next component on the NMR for the incoming message type
and
> > > > transform it to the message type of the selected component so that
it
> > > > will understand it. All this is done by simply adding all the
rules in
> > > > synpase rule-engine.
> > > >
> > > > In summary Synpase could provide:
> > > > - validation & classification (incoming XML message from the
NMR)
> > > > - enrichment (for example calling other external services and
> > > > inserting this data into the xml message)
> > > > - content based routing (choose next endpoint on the NMR)
> > > > - transformation (transform outgoing message so that the
selected
> > > > nmr-endpoint can understand it)
> > > >
> > > > .. that is a VERTO pattern: validate - enrich - route - transform
-
> > > operate.
> > > >
> > > > And all this information can be stored in the synapse registry.
JBI
> > > > routing in a centralized way. The components don´t need any more
> routing
> > > > logic except sending their messages to the synapse endpoint.
> > > >
> > > > Well.. that´s it ;). What do you think?
> > > >
> > > > Michael
> > > >
> > > > Paul Fremantle schrieb:
> > > > > So far we haven't done any work on JBI integration. You are the
> first
> > > > > person to ask for it! :-)
> > > > >
> > > > > Could you give us some more information on your requirements and
the
> > > > > benefits you think there might be of integrating with a JBI
> container?
> > > > >
> > > > > Paul
> > > > >
> > > > > On 7/22/07, Michael Buchholz < [EMAIL PROTECTED]> wrote:
> > > > >> Hi,
> > > > >>
> > > > >> I wonder how Synapse can be plugged into a JBI enviroment as
> service
> > > > >> engine for content based routing.
> > > > >>
> > > > >> After googling for a while I found this:
> > > > >>
> > > > >> @http://wiki.apache.org/incubator/SynapseProposal
> > > > >> "Synapse plans to support the Java Business Integration (JBI)
> standard,
> > > > >> but we plan do so as an add-on rather than as core APIs."
> > > > >>
> > > > >> Is this still a planed feature? Do you have any more
information on
> > > what
> > > > >> the steps are to achieve it?
> > > > >>
> > > > >> Thanks.
> > > > >> Michael
> > > > >>
> > > > >>
> > >
> ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > [EMAIL PROTECTED]
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
[EMAIL PROTECTED]
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]