I need to implement B2B as a hub, but I'm still having some doubts about how to identify the final recipient on some kind of messages were you can not introspect searching for a final recipient.
Lets take as example a pdf file that needs to be passed by backend application comming from a remote Trading Partner and delivered to a Remote TP having host TP as responsible to recieve the message and send it to the final recipient.
On this pdf processed as binary I'm using transport properties has file name to be able to select the agreements based on patterns on file name like : %FROM_PARTY%_%TO_PARTY%_%DOCTYPE_NAME%_%DOCTYPE_REVISION%
Well, acting as a HUB I need to identify the %TO_PARTY% = Host TradingPartner since the agreement is configured as RemoteTO -> HostTP
But in this way I have in fact message delivered to BackednApp but without having in reality a straight forward way to identify the final recipient of this message....