JMS Custom Output Adapter

Adapter type: jms_custom_out. The JMS Custom Output adapter publishes stream records as custom-formatted Java objects to a JMS queue or topic.

A custom-provided implementation performs the format conversions of this interface:

package com.sybase.esp.adapters;
public interface ESPToExternalConverter {
	public Serializable ESPToExternal(ESPMessage ESPMessage) throws Exception;
}

Ensure that stream column types correspond to Java classes as follows:

Stream Column Type Java Class
bigdatetime java.lang.Double
binary java.lang.String
boolean java.lang.Boolean
integer java.lang.Integer
interval java.lang.Long
date java.util.Date
float java.lang.Double
long java.lang.Long
money1 java.math.BigDecimal
money2 java.math.BigDecimal
money3 java.math.BigDecimal
money4 java.math.BigDecimal
money5 java.math.BigDecimal
money6 java.math.BigDecimal
money7 java.math.BigDecimal
money8 java.math.BigDecimal
money9 java.math.BigDecimal
money10 java.math.BigDecimal
money11 java.math.BigDecimal
money12 java.math.BigDecimal
money13 java.math.BigDecimal
money14 java.math.BigDecimal
money15 java.math.BigDecimal
string java.lang.String
timestamp java.util.Date

Ensure that implementations of the ESPToExternalConverter interface provide a constructor with a single argument of java.lang.String type or a default constructor with no arguments.

Note: The stream name, the opcode and the map of column name value of the ESPMessage object are guaranteed to be valid, even if some non-key column values may be null.

Ensure that a Java archive containing an implementation of the ExternalToEFSConverter interface is provided, and place it in the lib subfolder of the Event Stream Processor installation folder.

If an implementation is not provided, the default implementation is used and the ESPMessage object is returned with no actual conversion performed.

If you use the CCL ATTACH ADAPTER statement to attach an adapter, you must supply the adapter type.

Property Label Description
Converter Class Name

Property ID: converterClassName

Type: string

(Required) External to Event Stream Processor message converter fully qualified class name. No default value.

Connection Factory

Property ID: connectionFactory

Type: string

(Required) Connection factory class name. No default value.

JNDI Context Factory

Property ID: jndiContextFactory

Type: string

(Required) Context factory for JNDI context initialization. No default value.

JNDI URL

Property ID: jndiURL

Type: string

(Required) JNDI URL. No default value.

Destination Type

Property ID: destinationType

Type: choice

(Required) Destination type. Valid values are:
  • QUEUE
  • TOPIC
Default value is QUEUE.
Destination Name

Property ID: destinationName

Type: string

(Required) Destination name. No default value.

Delivery Mode

Property ID: deliveryMode

Type: choice

(Optional) Type of delivery mode. Valid values are:
  • PERSISTENT
  • NON_PERSISTENT
Default value is PERSISTENT.
Converter Parameter

Property ID: converterParam

Type: string

(Optional) External to ESP message converter start-up parameter. No default value.

PropertySet

Property ID: propertyset

Type: string

(Advanced) Specifies the name of the property set from the project configuration file. If you specify the same properties in the project configuration file and the ATTACH ADAPTER statement, the values in the property set override the values defined in the ATTACH ADAPTER statement. No default value.

Column To Message Property Map

Property ID: columnPropertyMap

Type: string

(Advanced) A comma-delimited list of ColumnName=PropertyName mappings that enables message filtering on the message broker side using the JMS selector mechanism.

Ensure that there are no spaces in the value of this property. For each mapped column name, the outbound message is paired with a corresponding JMS property whose value equals the column value. ColumnName1=PropertyName1,ColumnName2=PropertyName2...

No default value.
Date Format

Property ID: dateFormat

Type: string

(Advanced) Date format. Default value is YYYY-MM-DDTHH:MM:SS.SSS.

Timestamp Format

Property ID: timestampFormat

Type: string

(Advanced) Timestamp format. Default value is YYYY-MM-DDTHH:MM:SS.SSS.

Runs Adapter in GD Mode

Property ID: enableGDMode

Type: boolean

(Advanced) If set to true, the adapter runs in guaranteed delivery (GD) mode and all GD-related parameters become required. Default value is false.

Name of Column Holding GD Key

Property ID: gdKeyColumn

Type: string

(Advanced) Specifies column name in the Flex operator holding the GD key. The GD key is a constantly increasing value that uniquely identifies every event regardless of the opcode in the stream of interest. No default value.

Name of Column Holding opcode

Property ID: gdOpcodeColumn

Type: string

(Advanced) Specifies name of column in Flex operator holding opcode. The opcode is the operation code (for example, inserts, update, or delete) of the event occurring in the stream of interest. No default value.

Name of Truncate Stream

Property ID: gdControlStream

Type: string

(Advanced) Specifies name of the control window in the GD setup. The control window is a source stream that informs the Flex operator of which data has been processed by the adapter and can be safely deleted. No default value.

Purge After Number of Records

Property ID: gdPurgeInternal

Type: int

(Advanced) Specifies number of records after which to purge the Flex operator. Default value is 1000.

Batch Size to Update Truncate Stream

Property ID: gdBatchSize

Type: int

(Advanced) Specifies number of records after which the control window must be updated with the latest GD key. Default value is 1000.

Known limitations:

Related concepts
Guaranteed Delivery