Skip to main content

Posts

Showing posts from June, 2013

How to rollback/commit processing messages from WSO2 ESB when enabled JMS transaction

This blog post describes the below use-case where WSO2 ESB 4.6.0 act as the intermediate channel in-between two JMS queues. The Use-case First messages will be de-queue to a proxy service deployed in WSO2 ESB from an queue in ActiveMQ message broker. Then inside ESB,the incoming messages will undergo with some message mediation flow and then the message will be send to another JMS queue deployed in JBoss server. Inside the ESB,following failures could be happen;            a) Failures during message mediation process failure inside ESB [for example if you                use   dbreportmediator/lookup mediator inside mediation flow,some times failures can                happen due  to database connection failures]          b) Message sending failure,due to endpoint is unavailability.[For example,the JBoss  ...

Setting up monitoring outgoing message from WSO2 API Manager with TCPMon

There will be some requirements that need to monitor the outgoing message from WSO2 API Manager to real back-end endpoint.For example monitor JWT token value as explained in here . This blog-post describes how to add TCPMon monitoring in between WSO2 AM and real endpoint.In a diagram,below is how we going to setup TCPMon with WSO2 AM and endpoint. In other words,it means that the messages from WSO2 APIM should go to real endpoint via TCPMon tool. Say,real back-end endpoint is a web-service running in WSO2 Application Server[WSO2 AS] called 'echo'. The web-service endpoint will be as http://10.200.1.30:9763/echo When you create an API from WSO2 API Manager,you have to give the 'Production URL' of Add API page in APIPublisher app pointing to above 'echo' web service endpoint as below. But,if you need to place TCPMon in-between WSO2 APIM and WSO2 AS ,that means you need to direct messages from WSO2 APIM to WSO2 AS via TCPMon tool. Thus ...

Passing end-user details from client to real backend endpoint via JWT token

In real-world business system,WSO2 API Manager useful on exposing company APIs, in a secured and controlled manner with the features provided by APIManager as; OAuth support [To secure API invocations] Throttling support [To control API invocations] Monitoring support [To track API usage] More technically what happening is when a user sends a particular API request,it will goes to WSO2 APIManager node and from there,the request will route to the real implemented back-end endpoint of the particular API and get back the response and returned it to the API invoked user. There can be a use-case,that this back-end endpoint may expect the details of API invoked user as to pass those details to some internal company usage  as; Additional authentication/authorization Track usage data from an internal system. So how to support above requirement from WSO2 AM. There comes the use of JSON Web Token[JWT] implementation done inside WSO2 AM. JWT is a means of representing claims to...

Message Format Transformation from SOAP to POX

When WSO2 ESB used to process and forward some messages to a back-end endpoint,there will be chances,that back-end endpoint is expecting a XML message without a SOAP request.But at default,the messages which are pass through WSO2 ESB will be in SOAP format. For example,say from WSO2 ESB ,we are passing messages to a queue/topic inside a JMS broker as ActiveMQ/JBoss. And the further processing on this queue by the backend will be expecting a XML message to be enqueue to the queue,instead a SOAP envelope. Thus before send the message to JMS endpoint from WSO2 ESB,we need to convert the message format from SOAP to XML. This can be done through modifying the WSO2 ESB endpoint element. Add the attribute 'format=pox' to element of the configuration in the related WSO2 ESB proxy/sequence configuration as shown in below. <endpoint name="jms-service-epr"> < address format="pox" uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFa...