Rob,
If you need the fault/success status in your original poller component,
wouldn't it be easier to have it send In-Out exchanges instead.
Something like
akrpoller -> static routing slip -> XSLT
-> Logger
-> HTTP
This way, the response from the HTTP provider endpoint would go back to
the akrpoller automatically. If there is no fault in the message
exchange, it can ignore the response. Otherwise, it can stop polling or
whatever it should do...
Gert
Rob de Jong wrote:
Hello Gert,
I think the correct syntax for the faultsTarget is:
<eip:pipeline service="wkpb:pipeline2" endpoint="endpoint">
<eip:transformer>
<eip:exchange-target service="wkpb:WkpbVerwerkKennisgeving"/>
</eip:transformer>
<eip:target>
<eip:exchange-target service="wkpb:Dump"/>
</eip:target>
<eip:faultsTarget>
<eip:exchange-target service="wkpb:akrpoller"/>
</eip:faultsTarget>
</eip:pipeline>
Could you retry it with this configuration? If it doesn't
work, try settings the logging level to DEBUG (in
conf/log4j.xml). This should give you a complete trace of
all exchanges that are being handled by the ESB. Also, it's a
bit strange that you are sending the faults to a poller
service endpoint. Are you sure your BC can handle this type
of incoming messages?
Yes, the syntax you proposed works quite a lot better. Now it seems
the fault is returned to the custom component which, as you noticed
is not yet set up to handle faults.
error: javax.jbi.messaging.MessagingException:
Could not find route for exchange: RobustInOnly[
It is required for this component to receive the faults, since the
component will continue to poll and produce messages from a batch
until the batch is run out or an error occurs. So faults will need
to be processed in order to avoid improper behaviour. In future,
when there's time, this assembly will require some cleaning up, but
for now, I'd first want to see it work.
I've been searching for good sources on JBI components, to figure
out which methods I'd need to get this component 'fault-ready', yet
haven't found out how to yet. If you've a pointer in the right
direction, I'd be grateful.
Rob