Striim 3.10.1 documentation

JMS Writer

Writes data using the JMS API.

property

type

default value

notes

Connection Factory Name

String

the name of the ConnectionFactory containing the queue or topic

Ctx

String

the JNDI initial context factory name

Message Type

String

TextMessage

the other supported value is BytesMessage

Password

encrypted password

see Encrypted passwords

Provider

String

Queue Name

String

leave blank if Topic is specified

Topic

String

leave blank if QueueName is specified

Username

String

a messaging system user with the necessary permissions

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

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;