introduction to inbound endpoints in wso2 esb 4.9.0 (http/s, file, jms)
TRANSCRIPT
![Page 1: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/1.jpg)
Introduction to Inbound Endpoints
Isuru Udana
Associate Technical Lead
Viraj SenevirathneSoftware Engineer
Nov 2015
![Page 2: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/2.jpg)
About the Presenters
● Isuru Udana Associate Technical Lead WSO2
● Viraj Senevirathne Software Engineer WSO2
![Page 3: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/3.jpg)
Outline● Background
● ESB Basics
● Introduction to Inbound Endpoints
● HTTP Inbound Endpoint
● JMS Inbound Endpoint
● File Inbound Endpoint
● Demo
● Q & A
![Page 4: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/4.jpg)
WSO2 ESB● A lightweight, high performance ESB
● Feature rich and standards compliant
○ SOAP and WS-* standards
○ REST support
● Domain specific protocol support (eg: FIX, HL7)
● User friendly and highly extensible
● 100% free and open source with commercial support
![Page 5: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/5.jpg)
Key Features - Routing
![Page 6: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/6.jpg)
Key Features - Filtering
![Page 7: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/7.jpg)
Key Features - Transformation
![Page 8: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/8.jpg)
Key Features - Protocol Switch
![Page 9: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/9.jpg)
Key Features - Load Balancing
![Page 10: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/10.jpg)
Key Features - Quality of Service
![Page 11: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/11.jpg)
WSO2 ESB Basics
![Page 12: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/12.jpg)
High Level Message Flow
![Page 13: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/13.jpg)
High Level Message Flow
![Page 14: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/14.jpg)
Basic Constructs
![Page 15: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/15.jpg)
Building Blocks
![Page 16: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/16.jpg)
Programming Model
![Page 17: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/17.jpg)
Invoking Messages Flows
Messages can be injected into sequences through the following
interfaces:
![Page 18: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/18.jpg)
Invoking Messages Flows Proxy Services● Acts like a virtual service.
● Receives messages and mediates them before sending them to the
endpoint (usually an actual service)
Eg: Perform necessary transformations and/or introduce additional
functionality without changing existing service.
![Page 19: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/19.jpg)
Invoking Messages Flows
APIs (HTTP Services)● APIs can accept REST messages which allow clients to provide
additional information on how to manage the message
● Unmanaged API (API-Manager for managed APIs) ● Can handle multiple URLs
● Can handle parameters in the URL
![Page 20: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/20.jpg)
Invoking Messages Flows
Main Sequence● Messages not destined for Proxy Services/API are sent through Main
![Page 21: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/21.jpg)
Invoking Messages Flows Tasks● Allow configuration of scheduled jobs to execute internal/external
commands
● Inject a message into a proxy service, Main sequence or a named
sequence
![Page 22: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/22.jpg)
Invoking Messages Flows Inbound Endpoints● Newly introduced in ESB 4.9.0 release
● New Message Entry point
![Page 23: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/23.jpg)
Inbound Endpoints
![Page 24: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/24.jpg)
Inbound Endpoints● New Message Entry point
![Page 25: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/25.jpg)
Why Inbound Endpoints ?Limitations prior to ESB 4.9.0
● Conventional axis2 based Transports does not support dynamic
configuration
Ex: To change the ports, restart is required
axis2.xml configuration
![Page 26: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/26.jpg)
Why Inbound Endpoints ?Limitations prior to ESB 4.9.0
● Multi-tenancy support is limited
○ Only HTTP Transport supports multi-tenancy
![Page 27: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/27.jpg)
Inbound Endpoints Features
● A message source that can be configured dynamically
![Page 28: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/28.jpg)
● Inbound architecture allows Multi-tenancy for all transports
○ JMS, VFS, HL7, etc
Inbound Endpoints Features
![Page 29: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/29.jpg)
● Coordination Support
○ Controlled execution on clustered environment
○ Worker-Manager deployment for all transports
Inbound Endpoints Features
![Page 30: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/30.jpg)
Coordination Support - Single Consumer
Inbound Endpoints Features
![Page 31: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/31.jpg)
Inbound Endpoints FeaturesCoordination Support - Multiple Consumer
![Page 32: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/32.jpg)
● Injects messages directly from transport layer to mediation layer without going through the axis2 engine
● Dedicated thread pools per inbound
● Extending the functionality with custom inbound endpoints
Inbound Endpoints Features
![Page 33: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/33.jpg)
Inbound Endpoint Types● Listening Inbound Endpoints
● Polling Inbound Endpoints
● Event Based Inbound Endpoints
● Custom Inbound Endpoints
![Page 34: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/34.jpg)
Listening Inbound Endpoint● In this endpoint type messages send to the inbound endpoint by client.
○ Ex: HTTP, HTTPS
● Starts message listening interfaces dynamically
● Fully supported in multi-tenant environments.● HTTP, HL7, WS-RM, TCP Inbound Endpoints
![Page 35: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/35.jpg)
● Dynamically creates message polling interfaces.
Ex: JMS Inbound Endpoint – polls a given JMS queue and inject messages into an
ESB message flow.
● The the inbound endpoint will perform polling task with that specified time interval.
● We have to specify a polling interval when creating these type of inbound
endpoints.
Ex: File, JMS, Kafka
● Fully supported in multi-tenant environments ● Coordination support
Polling Inbound Endpoint
![Page 36: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/36.jpg)
Event Based Inbound Endpoints● This endpoint task will run only once to establish connection with remote server.
This connection will be used for executing inbound endpoint task.
Ex: MQTT, RabbitMQ
![Page 37: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/37.jpg)
Custom Inbound Endpoints
● Custom Inbound Endpoints are user defined inbound endpoints for custom tasks.
○ You will have to extend following classes for different implementations
■ Custom Listening Inbounds - GenericInboundListener
■ Custom Polling Inbounds - GenericPollingConsumer
![Page 38: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/38.jpg)
HTTP Inbound Endpoint
![Page 39: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/39.jpg)
● Dynamically configurable http and https endpoints at ESB runtime
○ Can create separate HTTP or HTTPS listeners which can handle messages separately
● Can directly inject messages to APIs, Proxies and sequences.
○ e.g.: There is a HTTP inbound endpoint running on port 8290.In order to inject messages
to a,
■ API (stockquote) - http://127.0.0.1:8290/stockquote/view/IBM
■ Proxy(StockQuoteProxy) - http://localhost:8290/services/StockQuoteProxy
■ Sequence - http://localhost:8290
● It is possible to specify different worker pool configuration for any inbound endpoint
HTTP/HTTPS Inbound Endpoint
![Page 40: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/40.jpg)
HTTP and HTTPS Inbound Endpoints
Important parameters used in HTTP and HTTPS Inbound Endpoint
Parameter Description
inbound.http.port The port on which the endpoint listener should be started.( HTTP and HTTPS)
keystore The KeyStore location where keys are stored.( HTTPS Only)
Worker Pool Configuration Parameters (Optional)
inbound.worker.pool.size.core The initial number of threads in the worker thread pool. This value can be changed accordingly based on the number of messages to be processed. (default 400)
inbound.worker.pool.size.max The maximum number of threads in the worker thread pool. (default 500)
Proxy Configurations related to HTTP/HTTPS inbound endpoints
inbound.only Whether the proxy service needs to be exposed only via inbound endpoints.
![Page 41: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/41.jpg)
Sample HTTP Inbound Configuration
HTTP and HTTPS Inbound Endpoints
![Page 42: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/42.jpg)
JMS Inbound Endpoint
![Page 43: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/43.jpg)
● This is a much improved alternative to JMS Transport
● Supports multi-tenancy unlike JMS Transport
● JMS inbound protocol implementation can receive messages from active
JMS server
● Supports coordination in clustered environment
JMS Inbound Endpoint
![Page 44: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/44.jpg)
Important parameters used in JMS Inbound Endpoint
JMS Inbound Endpoint
Parameter Description
Interval How frequently JMS inbound should poll the source JMS locationEg: 10 (ms)
sequential Set this to true if you want to process list of messages one after another.
coordination Set this to true if you want JMS polling in one instance at a time in a clustered environment
java.naming.factory.initial The JNDI initial context factory class. This class must implement the java.naming.spi.InitialContextFactory interface.
java.naming.provider.url The URL of the JNDI provider.
transport.jms.Destination The JNDI name of the destination.
transport.jms.ConnectionFactoryJNDIName The JNDI name of the connection factory.
![Page 45: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/45.jpg)
Sample JMS Inbound Configuration
JMS Inbound Endpoint
![Page 46: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/46.jpg)
File Inbound Endpoint
![Page 47: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/47.jpg)
● This is a much improved alternative to VFS Transport
○ Improved functionality over VFS Transport
○ Improved Error handling
● Supports multi-tenancy unlike VFS Transport
● Supports coordination in clustered environment
○ When co-orrdination is enabled in clustered environment file inbound
task will run on only one ESB instant at a time
● Capable of handling major major file systems like local file system, ftp, sftp,
smb etc.
File Inbound Endpoint
![Page 48: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/48.jpg)
Important parameters used in File Inbound Endpoint
File Inbound Endpoint
Parameter Description
transport.vfs. FileURI Specifies file source. Should use file system prefix in front of the location uri.Eg: file://<path>
Interval How frequently file inbound should poll the source file locationEg: 1000 (ms)
sequential Set this to true if you want to process list of files one after another
coordination Set this to true if you want file polling in one instance at a time in a clustered environment
transport.vfs. ContentType Content type of the files processed by the file inbound. To specify the encoding when reading a file, follow the content type with a semi-colon and the character set.Eg: text/plain;charset=UTF-32
transport.vfs. ActionAfterProcesstransport.vfs. ActionAfterFailuretransport.vfs. MoveAfterProcesstransport.vfs. MoveAfterFailure
These parameters can be used to specify the operation that should be done after processing a file or incase of processing failure
transport.vfs.DistributedLock This applies only in cluster deployments. Set to true if you need to avoid multiple servers trying to process the same file simultaneously.
![Page 49: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/49.jpg)
Sample File Inbound Configuration
File Inbound Endpoint
![Page 50: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/50.jpg)
Demo
![Page 51: Introduction to Inbound Endpoints in WSO2 ESB 4.9.0 (HTTP/S, File, JMS)](https://reader034.vdocuments.net/reader034/viewer/2022050613/58f19bed1a28ab67678b4609/html5/thumbnails/51.jpg)
QnA