How does it work
- It sends message always with tenant that is configured in deployment
- All other headers (excluding those beginning with 'Camel' or 'org.apache.camel') will be copied from exchange coming into component
- It sends message to message hub based on given configuration, it uses either Sender or Director
- Sender sends message to topic (then it will be forwarded to queues by subscriptions on mh)
- Director sends message to an actor
How to build integration flow using u4ik.camel.mh component:
You need to add uri to out component inside integration flow i.e:
<route id="first">
<from uri="direct:start" />
<to uri="mh://{{uri}}"/>
<to uri="mock:result"/>
</route>
### This uri can be constructed in two ways either using sender/receiver pattern or actor/director.:
Sender:<MessageType>?eventType=<eventTypeValue>&eventTypeVersion=<eventTypeVersionValue>
- Use sender when you would like to post a message on specific topic on mh
- Message type should be either DocumentMessage or EventMessage (EventMessage will not have body)
-
Examples: ``` sender:DocumentMessage?eventType=foo&eventTypeVersion=bar
sender:EventMessage?eventType=foo&eventTypeVersion=bar ```
Director:<Director Identifier>?actor=<actorSourceSystem.Actor Identifier>&command=<notObligatoryCommandText>
- Use director when you would like to send message to specific actor on mh
- Director in integration flow is not expecting responses from actors
- Command parameter is not obligatory
-
Examples: ```x director:foo?actor=bar.baz
director:foo?actor=bar.baz&command=executeOrder66 ```