integration - How to deal with 3+ message formats in mule? -
let's suppose i'm dealing 3 (very) different messages formats inside mule esb, i'll call them a, b , c. xml (via socket), custom text-format , soap transporting kind of xml (it's not same transported via socket), example. of them can transformed each other. a, b , c carry same information, in different formats.
each 1 of them have it's own entry point in flow, format validations etc..
but, there's (a lot) of logic need executed in of them dealing/extracting information, routing based in content, enriching etc etc..
what should do? mean, did research on integration patterns didn't found situation or similar.
the easier approach sounds taking 1 of formats (let's take b) "default" 1 of "main-flow" , implementing common logic based on it. then, every message arrives transformed b , transformed again destination format, if 2 points uses same format.
examples:
1) 1 "a" hit app, it's transformed "b" execute common-logic, it's transformed again "a" delivered.
2) 1 "c" hit app, it's transformed "b" execute common-logic, it's transformed "a" delivered.
then, question is, mule have feature provides me better way on doing or solution above looks reasonable?
thanks in advance.
the few options, of these can implemented in mule. first 2 close have suggested.
normalizer: http://eaipatterns.com/normalizer.html
canonical data model: http://eaipatterns.com/canonicaldatamodel.html
routing slip: http://eaipatterns.com/routingtable.html
envelope: http://eaipatterns.com/envelopewrapper.html
which use depend on messages , need them.
with canonical data model example build seperate flow each incoming type that:
- receives object in own format.
- translates object canonical object.
- passes message on main processing flow.
the main flow need know how process object.
any endpoints need original object sit behind transformer can reverses transformation.
you pick 1 of existing objects , use message variables remember original format or create new object remembers original type itself.
Comments
Post a Comment