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?
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).
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.
Related
I am getting this "Connection closed by target host before receiving the request" due this first system get time out.
But the problem is that we are getting the proper response from second system.
just provide one major problem
after getting the response from second system we are also getting the one more response.
that i am not able to understand.
the arch is
First System ---- > ESB ---->> second system
response
Second system ---->> ESB then we are going the clone
1. send response to first system
2. send request to DSS to log the request.
can you please help in this...
i am using wso2 esb 4.8.1 and i can not change right now it in production.
Regards,
Shachindra Singh
As you explained in your question, it seems connection between the client and the server has timed out. These kind of lagging can be happen due to the back-end slowness or the ESB server contention. Hence Increasing time out settings could be solve this problem.
By default the ESB closes the connection after 60 seconds. So even you increased the client(which send the request)the timeout the problem will not solve.
For your information in WSO2 ESB can set three types of timeouts:
socket timeout - This parameter will decide on the timeout which a
particular http request is waiting for a response.
endpoint timeout - This will help to configure timeout per endpoint.
synapse global timeout - This will decide the maximum time that a
callback is waiting in the ESB for a response for a particular
request.
Please refer below links [1], [2] to find more detailed information about WSO2 ESB Error Handling. Hopefully it will help you to solve the problem.
[1] http://soatutorials.blogspot.com/2015/06/wso2-esb-error-handling-tutorial-part-i.html
[2] https://docs.wso2.com/display/ESB480/Performance+Tuning
Cheers.
I am wondering if I can use BAM and CEP to monitor requests from client, and even find the bottleneck of the service.
I found zipkin, a project that could do this, but the base of my application is WSO2, I don't want to get other projects from scratch.
Yes, you can use BAM/CEP for this. If you need real time monitoring you can use CEP and you can use BAM for batch process. From BAM 2.4.0 onwards, CEP features have been added inside BAM also hence you can use BAM and do real time analytics.
What type of services are involved with your scenario? Depends on this you can use already existing data publisher or write new data publisher for BAM/CEP to publish your request details. For example if you are having chain of axis2 webservice calls for a request from client, and you want to monitor where the bottle neck/more time consumed, then you may use the service stats publishing, and monitor the average time take to process the message which will help you to see where the actual delay has been introduced. For this you can use existing service statistics publisher feature. Also BAM will allow you to create your own dashboard to visualize, hence you can customize the dashboard.
Also with BAM 2.4.0 we have introduced notifications feature also which you can define some threshold value and configure to send notification if that cross that threshold value.
I have a question around biztalk and what happens when certain conditions around web service ports are met.
basically we have two applications - a main application (lets call it 'MainApplication') (containing the orchestration) and a web service application (lets call it 'MainApplicationWS'), where we expose a web service (created from biztalks web service tool) to take messages from wherever.
we have a testing tool which replays messages to the MainApplicationWS to simulate messages coming through from various external systems.
I have noticed that if we partial stop the MainApplicationWS application, and send messages through to the web service listed as a recieve location, nothing happens (obviously!) (also, the web service is still running, even though its been delisted as a recieve location). however, if i start up the MainApplicationWS again and bounce the host instances the messages are picked up from somewhere and played through to the orchestration and through to our application.
Im just a bit puzzled as to where its storing these messages while the MainApplicationWS is partially stopped. is the web service somehow hanging on to these? or does it still post through to the biztalk message box?
any clarification would be greatly appreciated :)
cheers,
adam
In short, I can't repeat your behaviour in Biztalk 2009. The closest to 'queueing' messages is if the orchestration is stopped but remains enlisted, such that messages are suspended resumable.
In long - I'm not quite sure what you mean by 'delisted as a receive location'. In Biztalk 2009:
Receive Locations can be enabled or disabled
Orchestrations can be stopped, and unenlisted
A Partial Stop on your BTS application disables receive ports and stops orchestrations (but doesn't unenlist them)
A full stop stops and unenlists orchestrations
The below is observed behaviour on BizTalk 2009 for a simple orchestration with a WCF Request/Response port, which receives a message, Maps the Send back to the same Port
The port is Direct Bound (MessageBox).
If the Isolated Host App Pool is disabled in IIS
A synchronous error is returned to the client - Standard IIS Error (503 Service Unavailable etc)
BizTalk receives no messages at all
If the BizTalk receive Location is disabled
WSDL: Syncrhonous error returned to the client - The Messaging Engine failed to register the adapter for "WCF-BasicHttp" for the receive location "xyz.svc". Please verify that the receive location exists, and that the isolated adapter runs under an account that has access to the BizTalk databases
Service Call : The requested service, xyz.svc could not be activated. See the server's diagnostic trace logs for more information.
If the Orchestration is stopped, but not unenlisted
The received message is Suspended, resumable. The client times out (no response is issued).
If the orch is started and the message resumed, the message is then processed. The client will only get a successful reply if the orch start and the suspended message resume are done before the client's configured WS / WCF timeout.
If the Orchestration is unenlisted
The received message is Suspended, not resumable.
The client receives an error - The server was unable to process the request due to an internal error.
With the WCF CustomBinding it is also possible to listen directly on the relevant BizTalk ReceiveHost (i.e. no need for IIS at all to listen to BasicHTTP or WSHTTP, although we generally still use the Wizard generated svc in IIS solely for the hosting and publication of the WSDL. We then create a new WCF Custom receive location directly in BizTalk and point the client to this)
Hope this helps?
I'm using ActiveMQ CPP 5.2.3 if it matters.
I have JMS producer that connects using failover transport to JMS network of brokers.
When I call connection->start() it hangs up (see AMQ-2114).
If I skip connection start() and call connection->createSession(), than this call is blocked too.
The requirement is that my application will try forever to connect to broker(s).
Any suggestions/workarounds?
NOTE:
This is not duplicate of here, since I'm talking about C++ and such solutions as embedded broker, spring are not available in C++.
This is normal when the connection is awaiting a transport to connect to the broker. The start method must send the client's id info to the broker before any other operation, so if no connection is present it must block. You can set some options on the failover transport like the startupMaxReconnectAttempts option to control how long it will try to connect before reporting a failure. See the URI configuration page:
http://activemq.apache.org/cms/configuring.html
We have a mobile Application in a very unsteady WLan Environment. Sending Data to a webserver could result in a timeout or in a lost WLan connection.
How do we ensure, that our data is delivered correctly? Is there a possibility of having Web Services Reliable Messaging (WSRM) on the device?
MSMQ is no option at the moment.
WSRM isn't supported. A reliable mechanism is to ensure that either the Web Service responds to the upload with an ack after the data has been received (i.e. a synchronous call) or that when you start the upload you get back a transaction ID that you can then send back to the service at a later point to ensure that it has been delivered before local deletion.