Specifying the message type - 8.0

Talend ESB Service Developer Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-11-06

You can specify the message type supported by the consumer endpoint using a jms:runtimePolicy element that has a single attribute:

  • messageType - Specifies how the message data will be packaged as a JMS message. text specifies that the data will be packaged as a TextMessage . binary specifies that the data will be packaged as an ObjectMessage .

The following example shows a configuration entry for configuring a JMS consumer endpoint.

Configuration for a JMS Consumer Endpoint

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:ct="http://cxf.apache.org/configuration/types"
   xmlns:jms="http://cxf.apache.org/transports/jms"
   xsi:schemaLocation="
      http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans.xsd"
      http://cxf.apache.org/jaxws 
      http://cxf.apache.org/schemas/jaxws.xsd
      http://cxf.apache.org/transports/jms 
      http://cxf.apache.org/schemas/configuration/jms.xsd">
...
   <jms:conduit 
      name="{http://cxf.apache.org/jms_endpt}HelloJMSPort.jms-conduit">
      <jms:address ... >
         ...
      </jms:address>
      <jms:runtimePolicy messageType="binary"/>
      ...
   </jms:conduit>
...
</beans>

The id on the jms:conduit is in the form of { WSDLNamespace}WSDLPortName.jms-conduit . This provides CXF with the information so that it can associate the configuration with your service's endpoint.