To view recording of the webinar please use below URL:
http://wso2.com/library/webinars/2015/11/introduction-to-inbound-endpoints-in-wso2-esb-4.9-https-file-jms/
Inbound endpoints are one of the major features introduced in the latest WSO2 Enterprise Service Bus 4.9.0 release. It is a new message entry point (source) where the behaviour can be either polling or listening. This new concept improves multi-tenancy and dynamic message source creation aspects. In WSO2 ESB 4.9.0, HTTP/S, file, JMS, RabbitMQ, MQTT, Kafka and custom inbound endpoint types were introduced.
In this webinar we will mainly cover HTTP/S, file and JMS inbound endpoint types. We will discuss
An introduction to inbound endpoint functionality
How the concept of inbound endpoint can be used to create highly productive solutions
4. 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
18. 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.
19. 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
21. 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
25. 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
26. Why Inbound Endpoints ?
Limitations prior to ESB 4.9.0
● Multi-tenancy support is limited
○ Only HTTP Transport supports multi-tenancy
32. ● 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
34. 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
35. ● 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
36. 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
37. 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
39. ● 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
40. 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.
43. ● 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
44. Important parameters used in JMS Inbound Endpoint
JMS Inbound Endpoint
Parameter Description
Interval How frequently JMS inbound should poll the source JMS location
Eg: 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.
47. ● 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
48. 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 location
Eg: 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. ActionAfterProcess
transport.vfs. ActionAfterFailure
transport.vfs. MoveAfterProcess
transport.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.