natsout Processor

The natsout processor is used to publish messages to NATS via Core or JetStream.


Settings

SettingDescription
service.type=natsoutset the processor type
conn.namethe name of the nats connection to use
create.streamat startup, create (or update) the stream if it doesn’t exist
js.prefixset the js prefix
log.headerslist of headers from a message to log. use * to log them all
message.subject.sourcesee below
message.subject.valueused in conjuction with message.subject.source
message.header.nameset the header name
message.header.valueset the header value
message.header.sourceindicate where the value of the header originates

Subject and Header Source & Value

source and value are used to tell TEDI how to dynamically set the subject of a message as well as headers.

SourceDescription
staticuse this to set constants
goodybagfetch the value out of the integration metadata
jpathjpath expression to extract a field from a JSON document
xpathxpath expression to extract a field from a XML document

For example, to set a static subject:

message.subject.value   = "tedi2"
message.subject.source  = "static"

Or, to set one or more headers:

0.message.header.name    = "content-type"
0.message.header.value   = "application/xml"
0.message.header.source  = "static"

1.message.header.name    = "content-encoding"
1.message.header.value   = "identity"
1.message.header.source  = "static"

2.message.header.name    = "accept-encoding"
2.message.header.value   = "identity"
2.message.header.source  = "static"

3.message.header.name    = "id"
3.message.header.value   = "//menu/id/text()"
3.message.header.source  = "jpath"
3.message.header.required = true