get distributed sequence number

Distributed Sequence Number

Version: 17.07

Supported Since: 17.07

What is an Distributed Sequence Number Processor?

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.

get distributed sequence number

Sample Use Case

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.

Prerequisite

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

Implementation
seq num flow

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.

seq http nio ingress connector config

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.

seq num config

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

seq string payload setter config

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.

Out Ports

Output

Message will be emitted from this port

On Exception

The message context will be sent to this outport if any exception occurred while fetching the sequence number

Parameters

Variable To Export *

Basic

Variable name to hold the sequence number value

In this topic
In this topic
Contact Us