Using the Service Registry with Talend ESB - 8.0

Talend ESB Infrastructure Services Configuration Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2024-03-13

Once initialized, Service Registry offers the following commands within the Talend Runtime Container to operate with the Registry:

Service Registry commands
Command Description
tregistry:list <type> Lists Registry resources by type.
tregistry:create <type> <file> Installs a Registry resource into the JCR repository.
tregistry:read <type> <name> Views the content of a Registry resource.
tregistry:update <type> <name> <file> Overwrites the content of a given Registry resource with the specified file.
tregistry:delete <type> <name> Removes a Registry resource from the JCR repository.
tregistry:export [-a] type file Exports Registry resource(s) to an AtomPub XML file.
tregistry:import [-o] type file Imports Registry resource(s) from an AtomPub XML file.
For the above commands:
  • type refers to the resource type (wsdl for WSDL, metadata for metadata, ws-policy for POLICY, or ws-policy-attach for POLICY ATTACHMENT),

  • name identifies the resource,

  • file refers to the filepath and filename of the object to upload,

  • -a exports the policies attached to the WSDL to export,

  • -o overrides the resources during the import.

To get more detailed information about each command, use the help as follows: help tregistry:update or <tregistry:update --help.

Examples of use of these commands:

trun> tregistry:list ws-policy

Talend ESB  Registry :: Collection of ws-policy resources [size:2]
    Name
    - urn:uuid:87654321-abcd-bcde-cdef-123456789000
    - UsernameToken
karaf@trun> tregistry:create ws-policy E:/talend/TESB/demo/SAMLToken.policy

Create Registry ws-policy resource with name = 
    e12dee61-cbc6-4b22-9555-6b9edfa2dd90 : DONE

If synchronization with ElasticSearch is enabled, a set of additional commands becomes available:

Service Registry commands
Command Description
tregistry:sync <type>

Updates ElasticSearch with the current resource content of the Service Registry.

tregistry:search <type> <query> Implements the specified search query of a Registry resource.
For the above commands:
  • type refers to the resource type, which only supports metadata,

  • query refers to a JSON string which is passed to ElasticSearch as query document.

An example of use of these commands:
tregistry:search metadata '{ "query": { "term": { "metadataExtension.ServiceName.raw" : "{http://www.talend.org/service/}DemoService" }}}'

For more information about ElasticSearch, see event-logging_c.html.

Those operations can also be executed via: