2

I configured a BAM Server Profile and a stream in order to connect one of my Proxy Services to my BAM, I incorrectly configured the IP adress of my BAM.

When I sent a request to my proxy service, the call failed because the BAM server is not reachable. Does this mean that the exhanges between ESB and BAM is not asynchronous and can imply a failure of my proxy service?

Community
  • 1
  • 1

2 Answers2

0

Nicolas, every mediator is synchronous in the chain. If you want to call the BAM asynchronously, what you need to do is:

1) Use the clone mediator to create an asynchronous thread (Sequential Mediation: NO, Continue Parent: YES). http://wso2.org/project/esb/java/4.0.0/docs/mediators/clone.html

2) In the cloned target do all your async work and place the BAM Agent Mediator.

That way you'll have your mediation working not only safer but also with better performance (since all the transformation you may need while preparing the information to be sent to BAM is happening asynchronously).

GustavoH
  • 240
  • 2
  • 9
0

No. Although BAM mediator is synchronous as it is a mediator, data sending operation to BAM side is done asynchronously. That means if the BAM server is not reachable due to some reason (e.g., incorrect IP, BAM is not available) ESB still works properly without any problem. Only the message dumping to BAM will fail. That means mediation sequence will function properly with the server not found exception but the message logging will not happen.

During the development time of BAM mediator we considered cloning the entire message and send asynchronously to BAM side but we rejected that idea, as memory cloning will take significant time and processing which will slow down the ESB. But still data sending part (Data Bridge) works asynchronously as mentioned above.

Maninda
  • 2,086
  • 3
  • 15
  • 29
  • Sorry, but if I look at the GustovaoH's answer it seems that the mediator is synchoneous, and my test seems to confirm that, could you confirm your answer ? – user2252607 May 13 '13 at 15:36
  • Like GustovaoH says, BAM mediator executes sequentially as every other mediator. But here it captures the required data synchronously from message and delegate Data Bridge to send it to BAM server. In Data Bridge, Asynchronous Data Publisher try to send the message to BAM asynchronously. If it fails nothing severe happens to ESB other than printing an exception. I think you get my point. – Maninda May 14 '13 at 04:43