WSO2 ESB: route to specific node - axis2

I have WSO2 ESB and ELB instances installed.
When HTTP request comes to ESB, it opens a socket and waits for response.
But if ELB instantiates new ESB, then response can go to ESB #2 (instead of #1) and find that there is no socket connection. How would I route response to ESB #1?
[EDIT]
I have implemented custom Axis2 transport, which has class CustomTransportListener. There is a List of opened socket connections, which wait for response. This is the reason why only ESB #1 can handle response.

Each ESB in the ESB cluster behind the ELB is the same so it would not matter which ESB node in the cluster serves the request. The purpose of the ELB is to automatically balance the load and make it so that the complexities of the cluster is not seen so it does not provide a way to specify an specific node that should receive the response.
It is not possible to send a request to a specific ESB in the cluster through the ELB because the ELB uses an Round Robin algorithm to dispatch request to the ESB cluster so you can not gurantee that a specific ESB node will get the request. In my opinoin do not think it is a good idea to make the ESB's in the same cluster different from each other :).

Related

How to make kubernetes nodes outgoing request use System network

My spring boot application needs to call a third party API to verify an user data. now the API provided from third party, they have some restrictions like they only accept if the request comes from some specific IP.
Now our network consultant has made one of my worker nodes to be able to request this API. I can curl the request to the API and get a proper response. I can deploy my application on that worker node outside of kubernetes using tomcat and get proper response.
But when I deploy it on kubernetes cluster, it does not work. Does not work means that API don't accept/process the request. 503 service not available something like that.
Then I tried to curl the request from inside the pods of worker node and found it does not work.
So, I am guessing my Kubernetes is not using the configuration on the system network.
So is there any way I can make my worker node(even one worker node) to use the system network while calling that or any third party API, as I can see I can request and get proper response from API when I request it outside the cluster but from the worker node pc.

Configure RabbitMQ to route to queue via HTTP endpoint, therefore not needing the normal JSON data

For my deployment I have a number of 3rd party systems that can only send HTTP POST requests with metrics (I need in the queue) and they cannot be re-configured. My goal is to have specific endpoints (or vhosts) that when POST'd to will automatically route to the correct queue, without needing the necessary routing key and other standard rabbitmq JSON data. As this modification is not possible in the 3rd party systems.
I can't find any way to do this natively as of now, but I believe it may be possible to configure a HTTP reverse proxy in the front, whereby any data sent to the specific endpoint, will be re-directed to the correct rabbitMQ HTTP endpoint, where I could then bolt in the nessary JSON data so it can be parsed by rabbitmq and placed in the realvent queue. I wanted to check if this is the only logical solution to this, or am I missing something obvious that can be done within rabbitmq's administration page or via config files.

WSO2 ESB - can it support concept with bridging webservice and MQ messages?

is it possible to implement following concept with WSO2 ESB:
http listener for webservices with a method to be called (SOAP)
java routine to process message
same routine to put message to MQ queue Q1
same routine to get answer message from MQ queue Q2
return with processed answered message to webservice caller
or it's better to go with J2EE server and handle messaging part fully through java code?
Regards, Nikola
Well now usecase is much more clear so that we can go ahead and implement it. There are two ways of doing this.
First Approach
Write a Proxy(HTTP to JMS) service which accepts HTTP requests and
place it in JMS Q1 using the jms sender.
Then write another proxy (JMS to JMS), which picks the messages from
JMS Q1, process it and place it in JMS Q2.
Finally create another proxy (JMS to HTTP) to get the message from
JMS Q2 and send it back to the client using the respond mediator.
Second Approach
Create a proxy service (HTTP to JMS) and use store mediator to store the message into JMS Q1.
Create a Forwarding Message Processor to listen to Q1 and pick the message, process it, place it in Q2.
Then create another forwarding message processor to listen to Q2, and send it back to the client using a reply sequence in the message processor.
Choose which ever the way you like and let me know how it goes.
You can use ESB to implement this. But your usecase is not that clear to me. Appreciate if you can explain your usecase in functional perspective. Anyway you have HTTP(S)/JMS listeners and senders with ESB . You can't listen to a SOAP web service using ESB. What you can do is listen to HTTP traffic. Create a proxy that listens to HTTP traffic and send the message to JMS queue Q1 ussing JMS end point. Then write a JMS listener proxy to listen to the answers in Q2. Once it is received you can call the endpoint web service using send or call mediator. This is how I understood your usecase. I have no idea on transformation of data in Q1 and place it in to Q2 due to wired requirements specified above. It looks simple HTTP to JMS switching usecase to me.

Secured HL7 Transport in WS02 ESB?

My group is evaluating HL7 Proxying and came across WS02 ESB. I have successfully configured an HL7 Proxy that seems to work well. Now my task is to secure the listening point with SSL (TLS specifically). This seems like something that the ESB should be able to handle. It can do HTTPS, Secured Web Services, etc. However, there doesn't seem to be a way to enable this with a simple check box for HL7 Proxying, nor am I finding any documentation on how to enable it manually.
Is it even possible to do secured HL7 Proxying within WS02 ESB?
Thanks in advance!
It seems WSO2 is using HAPI client for HL7 implementation and when I go through the code it seems TLS is disabled by default. Refer https://github.com/wso2/carbon-mediation/blob/master/components/business-adaptors/hl7/org.wso2.carbon.business.messaging.hl7.transport/src/main/java/org/wso2/carbon/business/messaging/hl7/transport/HL7TransportListener.java#L78

How to invoke CXF Asynchronous web service from apache camel

I have a javascript client which invokes an asynchronous web service with the callback in apache tomcat server. Webservice places the request to xmpp server and returns. I have another receiver component which receives the message from the xmpp server process it and puts back the response in another xmpp receiver queue. Now I would like to know of by connecting Apache Camel to the receiver queue, how can I notify the client callback. Do we have any option in apache camel to do this.
Please let me know if you have any thoughts on this.
thanks
Lokesh