Striim 3.9.6 documentation

JMS Writer

Writes data using the JMS API 1.1.

property

type

default value

notes

ConnectionFactoryName

java.lang.String

the name of the ConnectionFactory containing the queue or topic

Ctx

java.lang.String

the JNDI initial context factory name

messagetype

java.lang.String

TextMessage

the other supported value is BytesMessage

Password

com.webaction. security.Password

see Encrypted passwords

Provider

java.lang.String

QueueName

java.lang.String

leave blank if Topic is specified

Topic

java.lang.String

leave blank if QueueName is specified

UserName

java.lang.String

a messaging system user with the necessary permissions

This adapter has a choice of formatters. See Supported writer-formatter combinations for more information.

Sample code using DSVFormatter:

CREATE SOURCE JMSCSVSource USING FileReader (
  directory:'/opt/Striim/Samples/PosApp/appData',
  WildCard:'posdata.csv',
  positionByEOF:false,
  charset:'UTF-8'
)
PARSE USING DSVParser (
  header:'yes'
)
OUTPUT TO CsvStream;

CREATE TYPE CSVType (
  merchantName String,
  merchantId String,
  dateTime DateTime,
  hourValue Integer,
  amount Double,
  zip String
);

CREATE STREAM TypedCSVStream of CSVType;

CREATE CQ CsvToPosData
INSERT INTO TypedCSVStream
SELECT data[0],data[1],
  TO_DATEF(data[4],'yyyyMMddHHmmss'),
  DHOURS(TO_DATEF(data[4],'yyyyMMddHHmmss')),
  TO_DOUBLE(data[7]),
  data[9]
FROM CsvStream;

CREATE TARGET JmsTarget USING JMSWriter (
  Provider:'tcp://192.168.123.101:61616',
  Ctx:'org.apache.activemq.jndi.ActiveMQInitialContextFactory',
  UserName:'striim',
  Password:'******',
  Topic:'dynamicTopics/Test'
)
FORMAT USING DSVFormatter (
)
INPUT FROM TypedCSVStream;