This guide describes how to sink data from RisingWave to NATS subjects using the NATS sink connector in RisingWave. Both NATS and NATS JetStream are supported by this connector.
NATS is an open source messaging system for cloud native applications. It provides a lightweight publish-subscribe architecture for high performance messaging.
NATS JetStream is a streaming data platform built on top of NATS. It enables real-time and historical access to streams of data via durable subscriptions and consumer groups.
Before sinking data from RisingWave to NATS or NATS JetStream, please ensure the following:
To sink data from RisingWave to a NATS subject, create a sink using the syntax below:
After the sink is created, RisingWave will continuously sink data to the NATS subject in append-only mode.
The NATS sink connector in RisingWave provides at-least-once delivery semantics. Events may be redelivered in case of failures.
According to the NATS documentation, stream names must adhere to subject naming rules as well as be friendly to the file system. Here are the recommended guidelines for stream names:
.
), greater than (>
) or asterisks (*
).NUL
or LPT1
.Foo
and foo
would collide on Windows or macOS systems.Field | Notes |
---|---|
server_url | Required. URLs of the NATS server, in the format of address:port . If multiple addresses are specified, use commas to separate them. |
subject | Required. NATS subject that you want to sink data to. |
connect_mode | Required. Authentication mode for the connection. Allowed values:
|
jwt and nkey | JWT and NKEY for authentication. For details, see JWT and NKeys. |
username and password | Conditional. The client user name and password. Required when connect_mode is user_and_password . |
type | Required. Sink data type. Its value should be append-only . |
This guide describes how to sink data from RisingWave to NATS subjects using the NATS sink connector in RisingWave. Both NATS and NATS JetStream are supported by this connector.
NATS is an open source messaging system for cloud native applications. It provides a lightweight publish-subscribe architecture for high performance messaging.
NATS JetStream is a streaming data platform built on top of NATS. It enables real-time and historical access to streams of data via durable subscriptions and consumer groups.
Before sinking data from RisingWave to NATS or NATS JetStream, please ensure the following:
To sink data from RisingWave to a NATS subject, create a sink using the syntax below:
After the sink is created, RisingWave will continuously sink data to the NATS subject in append-only mode.
The NATS sink connector in RisingWave provides at-least-once delivery semantics. Events may be redelivered in case of failures.
According to the NATS documentation, stream names must adhere to subject naming rules as well as be friendly to the file system. Here are the recommended guidelines for stream names:
.
), greater than (>
) or asterisks (*
).NUL
or LPT1
.Foo
and foo
would collide on Windows or macOS systems.Field | Notes |
---|---|
server_url | Required. URLs of the NATS server, in the format of address:port . If multiple addresses are specified, use commas to separate them. |
subject | Required. NATS subject that you want to sink data to. |
connect_mode | Required. Authentication mode for the connection. Allowed values:
|
jwt and nkey | JWT and NKEY for authentication. For details, see JWT and NKeys. |
username and password | Conditional. The client user name and password. Required when connect_mode is user_and_password . |
type | Required. Sink data type. Its value should be append-only . |