## Apache Synapse

## Apache Synapse FAQs

Welcome to Apache Synapse FAQs.

## General(GeneralApache Synapse questions - Non technical)

1. What is Apache Synapse?
   - Apache Synapse is a lightweight and high-performance Enterprise Service Bus (ESB).

2. What makes Apache Synapse unique?
   - Apache Synapse is fast and able to handle thousands of concurrent connections with constant memory usage. It comes with a rich set of mediators to support almost any integration scenario out of the box. It is also easily extensible and highly customizable.

3. What is the license?
   - Apache Synapse comes with Apache 2.0 licence.

## Mediation(Questions related to sequences, endpoints, proxies etc)

1. What is a proxy service?
   - A proxy service is a virtual service hosted on the ESB. It can accept requests from service clients, just like a real Web Service. A proxy service can process requests and forward them to an actual Web Service (back end service) to be further processed. The responses coming back from the back end service can be routed back to the original client. Proxy services are mostly used to expose an existing service over a different transport, format or QoS configuration.

2. What is a mediator?
   - A mediator is the basic message processing unit in the ESB. A mediator can take a message, carry out some predefined actions on it and output the modified message. Apache Synapse ships with a range of mediators capable of carrying out various tasks on input messages.

3. What is a sequence?
   - A sequence is an ordered list of mediators (a mediator chain). When a sequence is given a message, it will go through all the mediators in the sequence. A sequence can also handover messages to other sequences.

4. What is an Endpoint?
   - A logical representation of an actual endpoint or a group of endpoints (i.e. Load Balancing and Fail Over).

5. What are Local Entries?
   - Local entries can be used to hold various configuration elements required by sequences and proxy services. Usually they are used to hold WSDLs, XSDs, XSLT files etc. A local entry can contain XML content as well as plain text content. A local entry can be configured to load content from a remote file too.

6. What is a Message Mediation?
   - Managing and transforming the messages flowing between the client and a service in an enterprise.

7. What is Message Mediation?
   - Mediating messages coming into a specific service by specifying the target URI as a Synapse mediation service.

8. What is Service Mediation?
   - Mediating messages coming into a specific service by specifying the target URI as a Synapse mediation service.

9. What is a Message Store?
   - Message Store is the storage for ESB messages. It can be an in-memory store or can be JMS store with an external Message Broker. You can always plug your own message store implementations as well.

10. What is a Message Processor?
    - Message processor can be used to implement different messaging and integration patters along with Message stores. Message processors will consume the messages in message stores and do the processing of them.

11. What is a Template?
    - ESB Templates try to minimize this redundancy by creating prototypes that users can re-use and utilize as and when needed. This is very much analogous to classes and instances of classes where-as, a template is a class that can be used to wield instance objects such as templates and endpoints.

12. What is the REST Api?
    - REST Api can be used to mediate HTTP POST, GET, PUT and DELETE request through Synapse and to integrate various RESTful services.

13. Can Endpoint perform error handling?
    - Yes. Endpoints can do error handling. User can configure the behavior of an endpoints when it faced to a erroneous situation.

## Transports(Transport related questions)

1. What are the transports supported by the Apache Synapse?
   - HTTP, HTTPS, VFS based file transport, FIX, Hessian, HL7,UDP, JMS, Mail, TCP, XMPP

2. Do I need an external JMS broker for the JMS transport?
   - Yes, Apache Synapse requires an external JMS broker like Apache ActiveMQ

3. Does Apache Synapse support two way JMS scenario (request/response) ?
   - Yes, you can refer sample 264 which demonstrates exactly the JMS request/response scenario.

4. What is the Passthrough transport?
   - This is the default HTTP transport used by Apache Synapse. HTTP PassThrough Transport is a non-blocking HTTP transport implementation based on HTTP Core NIO and specially designed for streaming messages. It is similar to the old message relay transport, but it does not care about the content type and simply streams all received messages through. It also has a simpler and cleaner model for forwarding messages back and forth. It can be used as an alternative to the NHTTP transport.

5. What is the NHTTP transport?
   - NHTTP stands for non-blocking HTTP. NHTTP transport uses the Java Non-blocking I/O API. This allows the NHTTP transport to scale into handling hundreds of connections without blocking the threads. The server worker threads used by the NHTTP transport do not get blocked on I/O until the Synapse receives responses for the already forwarded requests. Therefore Apache Synapse can accept more concurrent connections and requests than most HTTP server products.

6. What is the underlying HTTP library used by the NHTTP/Passthrough transport?
   - NHTTP transport uses the Apache Http Core NIO library underneath. This library provides low level I/O handling and HTTP level detail handling.