Hi Mats,
see comments inline
Mats Norén wrote:
Hi,
I've got a couple of questions regarding routing and auditing in SM:
- How does containerbased routing work?
Looking at the descriptions in
"http://servicemix.org/How+does+routing+work+in+JBI" I see that it´s
possible to let the container decide. How is this decision made and is
the container pluggable so I can add different policys? Or is the
prefered way to create a component that does the routing for me?
"# a component can let the container find the service to invoke
operations on
# a component can give the container some hints by specifying the
service, interface and/or operation to invoke and then let the
container choose which physical service endpoint to invoke using some
choosing algorithm (maybe using rules or policy driven metadata).
Remember there may be many services available for a specific service,
interface and operation names"
Routing is done accordingly to the JBI spec (you should read it
eitherway), but mainly, when you send a message,
you have to tell the NMR where it should be routed, by specifying the
interface, service or destination endpoint.
The endpoint (service name + endpoint name) is unique within the
container, so that's the most specific way. You can also choose to
specify only the service name or the interface name. The NMR will
retrieve these informations and choose an endpoint accordingly.
There is way to customize the choose of an endpoint when the service
name or interface name is specified.
See org.servicemix.jbi.nmr.Broker class for that.
- Are there any plans regarding auditing and/or logging in ServiceMix?
In our usecase it is *very* important to be able to monitor the
different steps in a flow inside servicemix. And not just the message
count but sometimes the whole message.
Is there a best practice in doint auditing and logging inside SM?
I had an idea that I would derive a baseclass for our components based
on the PojoSupport and use JMX to dynamically add or remove an audit
endpoint for the component.
Every call to the component would also do an InOnly exhange with the
audit-endpoint if it is enabled. Is this a feasible solution?
Auditing is a major feature that will be available asap. It will enable
you to browse the exchanges and eventually to modify and resend an
exchange. Check https://jira.logicblaze.com/jira/browse/SM-146 to keep
informed.
You can also vote for the features, so that we can know what people need.
Cheers,
Guillaume Nodet
Regards Mats