get node name

Fetch Node Name

Version: 17.07

Supported Since: 17.07

What is an Fetch Node Name Processor?

Fetch Node Name processing element can be used to fetch the node name of the currently running UltraESB-X instance. When configuring a cluster of UltraESB-X instances, a node name should be specified in order to uniquely identify each UltraESB-X instance inside the cluster.

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 node name

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 node name of the UltraESB-X instance.

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
node name flow

To implement above use case, first let’s create our integration flow named “integrate-for-node-name". Then add an NIO HTTP Ingress Connector and configure the request receiving service path and port.

node http ingress connector config

Then Fetch Node Name 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 node name into it.

node name config

Add a String Payload Setter processing element and set the variable name which includes the node name as the string value of processing element

node 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 node name 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 node name

Parameters

Variable To Export *

Basic

Variable name to hold the node name value

In this topic
In this topic
Contact Us