WSO2 ESB - How does Passthrough handle empty payloads - wso2

Hi I would like to know if the WSO2 ESB stalls whenever consecutive ping requests are made (without any payload). Is there a way to capture such scenario.

WSO2 ESB does not stall when the incoming payload is empty. It will internally represent it as a soap envelope with an empty body.

Related

Why secured HL7 Transport in WSO2 EI is disabled?

I would like to use a secure connection for exchanging hl7 messages with WSO2 EI.
Refers to this answer my doubt is why this option is disabled in the code of the HL7TransportListener since hl7 connections carry very sensitive data.
Thanks in advance

Why does my WSO2 EI (ESB) proxy service hang for 3 minutes?

I have a BPS process that rapidly performs a lot of calls to an ESB proxy. The ESB proxy calls an ESB API, which calls the API of our own product.
Often, the BPS process pauses for exactly 3 minutes while waiting for a response from the ESB. After the 3 minutes, everything continues as if nothing happened. Using Wireshark and some additional Log mediators, I have discovered the following:
The hanging occurs in the ESB proxy, right before the out sequence.
According to Wireshark, the ESB API has already sent its response to the ESB proxy when the hanging occurs.
The fact that this hanging takes exactly 3 minutes should be a hint. I searched the config files for anything specifying 180 seconds, but the only ones are the http socket timeouts and the http transportReceiver's threadKeepAliveTime. If I reduce those, the BPS throws a p2p communication error instead of continuing. To me, this indicates that something somewhere in the background is still causing a 3 minute delay for some calls.
By the way, the hanging does not occur for some specific calls only. I have been testing several times, performing the exact same calls each time, and I cannot predict which call will hang or even if any call will hang at all.
I would suggest you add at least a <send /> mediator in your faultSequence.
Perhaps also add a simple makefault mediator (don't make it too complex just yet - just a static error response will do - at this stage you don't want faults originating within the faultSequence)
I suspect some error from the backend service or in the out sequence or maybe even faultSequence is not being handled - which means instead of sending a response back to your caller, the proxy hangs until time out instead
PS: It really helps if you post the source code of your proxy too
I had the same experience sometimes ago when I tried to call PUT or POST methods without a request body. But, by default, WSO2 ESB expects a message body to send the request to backend server when the http method is POST or PUT.
I had to either send the request with a request body (at least an empty JSON: {}) or use the property FORCE_POST_PUT_NOBODY in your APIs.
Read this post for more details on how to use FORCE_POST_PUT_NOBODY property.
If you enable the wire log in WSO2 you will realize NGIX is using HTTP 1.0 client in the request.
In order to fix that change your NGINX mapping to use "proxy_http_version 1.1;" and the problem will be sorted.
Cheers.
I ended up getting WSO2 support involved in this. Apparently, I was hitting some very rare edge case which was very hard for the WSO2 engineers to reproduce.
In the end, the fix turned out to be adding the following property just before the send mediator in the proxy service:
<property name="NO_KEEPALIVE" value="true" scope="axis2"/>

Can WSO2 MB handle HTTP requests?

I've been working with WSO2 Message Broker in order to publish and consume messages through jms and other clients. I've gone through the official documentation including the samples.
What I want to know is that, is it possible for WSO2 MB to handle http requests directly instead of jms. Yes you can do something like this, by converting http to jms through WSO2 ESB which seems like a long process.
ie: I mean having http as the end point or the transport to publish and consume messages directly in WSO2 Message Broker.
In order to achieve this, you will have to use ESB + MB set up as explained at [1]. What you can do is to use ESB to wrap JMS functionality using a HTTP client. It is recommended to use ESB externally in a separate JVM when using this setup.
[1] http://wso2.com/library/articles/2013/03/configuring-wso2-esb-wso2-message-broker/
Regards,
Pubudu.

wso2:esb: What is the basic difference between call mediator and send mediator

Anybody would please through some light on difference between call and send mediator and what use cases these two mediators are used.
Send mediator - used to send messages out of Synapse to some endpoint. Then the response is returned to the OutSequence where you can send it back to the client
Use cases - When you only need to send a message to one back end and return the response back to the client.
Call mediator - Also used to send messages out of the Synapse to some endpoint, but the response does not come to the OutSequence. When we send a request using the call mediator, the response will arrive to the mediator that is placed right after the call mediator.So this will allow us to specify all the service invocations one after the other in a chain within a single sequence
Use cases - Service chaining. i.e.- Vehicle license renewal service
Another characteristic is that the callout mediator is blocking, send mediator and call mediator are not blocking. This answer is in regards to WSO2 versions until 4.8.0

Sending large payloads via WSO2 ESB

I'm trying to do some load testing on the WSO2 ESB, and I have a SOAP message with a large payload that I'd like to send (10+MB, sometimes reaching 50 inbound, and sometimes even 300 outbound).
I'm using curl to send the messages, first to the backend SOPAUI service. This goes through fine. However when I send the message via a proxy service on the ESB, curl fails to finish uploading the file, and gets slower and slower as the upload progresses. The logs from the ESB do not seem to be reporting anything useful.
I have set the timeout on this to 20 minutes, and it still does not complete. Turning on MTOM has no effect, and I am using a simple passthrough proxy. The proxy service functions fine with small message sizes.
What else can I look into to get this working? If it is indeed possible.
You could try to configure Message Relay
in repository/conf/axis2.xml, you configure :
org.wso2.carbon.relay.BinaryRelayBuilder as the messageBuilder's class associated with your contentType (text/xml for exemple if soap11 of application/soap+xml with soap12)
org.wso2.carbon.relay.ExpandingMessageFormatter as the messageFormatter's class
Have a look there : https://docs.wso2.com/display/ESB481/Message+Relay
Turned out I had to switch to using the NHTTP transport rather than the Passthrough transport, thanks to this question here for prompting looking into this: WSO2 ESB unknown error code 102511
Requires an edit in carbon.xml, detailed in the accepted answer from the link above.