Version: 17.07
Supported Since: 17.07
Distributed Sequence Number processing element can be used to fetch an atomically incrementing number inside a cluster of UltraESB-X instances. This makes sure that no two instances inside a particular cluster, receive the same number.
In order to use this processing element, you must first select the Cluster Management dependency from the processor list when you are creating an empty Ultra project. If you have already created a project, you can add this dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Processors list, select the Cluster Management dependency. |
In the following use case, the requirement is to create a web service which will accept http requests and respond with the configured sequence number.
To tryout this processor, you should have clustering enabled. This will guide you through how to create a cluster of UltraESB-X with the support of Zookeeper.
In order to implement above use case you must first select following dependencies when you are creating an empty Ultra project
HTTP NIO Connector from the connector list.
Clustering Manager Processors and Payload Manipulation Processors dependency from the processor list.
If you have already created a project, you can add above dependencies via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Connectors list and Processors list, select above dependencies
To implement above use case, first let’s create our integration flow named “integrate-for-seq-number". Then add an NIO HTTP Ingress Connector and configure the request receiving service path and port.
Then Distributed Sequence Number processing element should be added to the Out Port of NIO HTTP Ingress Connector. From the property pane, add a name for the variable that should copy the value of sequence number into it.
Add a String Payload Setter processing element and set the variable name which includes the value of sequence number as the string value of processing element
Now run your integration flow and send a request message to the configured request URL to test your integration flow. Once you send a request, you should receive the sequence number value as the response.