Component Options and Configurations - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

The SJMS Component supports the following configuration options:

Option

Required

Default Value

Description

connectionCount

 

1

The maximum number of connections available to endpoints started under this component

connectionFactory

null

A ConnectionFactory is required to enable the SjmsComponent. It can be set directly or set set as part of a ConnectionResource.

connectionResource

 

null

A ConnectionResource is an interface that allows for customization and container control of the ConnectionFactory. See Plugable Connection Resource Management for further details.

headerFilter-

Strategy

 

DefaultJmsKey-FormatStrategy

 

keyFormatStrategy

 

DefaultJmsKey-

FormatStrategy

 

transactionCommit-

Strategy

 

null

 

Below is an example of how to configure the SjmsComponent with its required ConnectionFactory provider. It will create a single connection by default and store it using the components internal pooling APIs to ensure that it is able to service Session creation requests in a thread safe manner.

SjmsComponent component = new SjmsComponent();
component.setConnectionFactory(new 
ActiveMQConnectionFactory("tcp://localhost:61616"));
getContext().addComponent("sjms", component);

For a SjmsComponent that is required to support a durable subscription, you can override the default ConnectionFactoryResource instance and set the clientId property.

ConnectionFactoryResource connectionResource = new ConnectionFactoryResource();
connectionResource.setConnectionFactory(new 
ActiveMQConnectionFactory("tcp://localhost:61616"));
connectionResource.setClientId("myclient-id");
 
SjmsComponent component = new SjmsComponent();
component.setConnectionResource(connectionResource);
component.setMaxConnections(1);