Looking up using consumer policy - 8.0

Talend ESB Infrastructure Services Configuration Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend ESB
Talend Runtime
Design and Development
Installation and Upgrade
Last publication date

With Talend ESB, you can use a custom attribute in the Policy Attachment and distinguish a consumer policy in the Service Registry REST Service. The Service API will be updated to support additional attributes. The Persistence layer is not changed.

The Service Registry REST Service API is extended to support the possibility to get consumer and provider policies:

@Produces({ "multipart/mixed;type=application/wspolicy+xml" })
Response lookupConsumerPolicy(@PathParam("serviceQName") String serviceQName,
                              @QueryParam("consumerPolicyAlias") String consumerPolicyAlias);
@Produces({ "multipart/mixed;type=application/wspolicy+xml" })
Response lookupProviderPolicy(@PathParam("serviceQName") String serviceQName);

The lookupConsumerPolicy method returns the consumer policy with consumerPolicyAlias, which is provided as a method parameter;

The lookupProviderPolicy method returns all provider policies for service which name is provider as method parameter;

The existing lookupPolicy method is changed to support new optional parameters: policyType and consumerPolicyAlias:

@Produces({ "multipart/mixed;type=application/wspolicy+xml" })
Response lookupPolicy(@PathParam("serviceQName") String serviceQName,
                      @QueryParam("policyType") String policyType,
                      @QueryParam("consumerPolicyAlias") String consumerPolicyAlias);

The lookupPolicy method is changed (extended) to support receiving consumer, default, or provider policies. This new implementation of this method is compatible with the previous versions of the Service Registry clients:

not set any value or not set provider policies (for backwards compatibility)
consumer not set default consumer policies (or provider policies, in case the default consumer policy does not exist)
consumer some consumer policy alias policies with specified consumer policy alias
provider any value or not set all provider policies

Note that the provider policies for the consumer policy type will be retrieved ONLY if consumer policy alias is not specified and no default consumer policies are registered for the whole service. Otherwise the consumer policy will be retrieved and applied independently on scope specified inside the policy.