CREATE NOTIFIER

Creates a push-based notifier to send event notifications and messages out of Vertica.

Syntax

CREATE NOTIFIER [ IF NOT EXISTS ] notifier‑name ACTION action‑url
   [ ENABLE | DISABLE ]
   [ MAXPAYLOAD max‑payload‑size ]
   MAXMEMORYSIZE max‑memory‑size
   [ IDENTIFIED BY uuid ]
   [ [NO] CHECK COMMITTED ]
   [ PARAMETERS 'adapter‑params' ]
         

Parameters

IF NOT EXISTS

Specifies to generate an informational message if an object already exists under the specified name. If you omit this option and the object exists, Vertica generates a ROLLBACK error message. In both cases, the object is not created.

The IF NOT EXISTS clause is useful for SQL scripts where you want to create an object if it does not already exist, and reuse the existing object if it does.

For related information, see ON_ERROR_STOP.

notifier‑name This notifier's unique identifier.
ACTION action‑url

Identifies the target Kafka server, where action‑url has the following format:

kafka://kafka‑server‑ip‑address:port‑number

For example:

kafka://127.0.0.1:9092
ENABLE|DISABLE Specifies whether to enable or disable the notifier. If you omit this parameter, Vertica sets this notifier to ENABLE.
MAXPAYLOAD

The maximum size of the message, up to 10^9 bytes, specified in kilobytes or megabytes as follows:

MAXPAYLOAD integer{K|M}

The default setting is adapter-specific—for example, 1 M for Kafka.

MAXMEMORYSIZE

The maximum size of the internal notifier, up to 2 TB, specified in kilobytes, megabytes, gigabytes, or terabytes as follows:

MAXMEMORYSIZE integer{K|M|G|T}

If the queue exceeds this size, the notifier drops excess messages.

IDENTIFIED BY uuid Specifies the notifier's unique identifier. If set, all the messages published by this notifier have this attribute.
[NO] CHECK COMMITTED Specifies to wait for delivery confirmation before sending the next message in the queue. Not all messaging systems support delivery confirmation.
PARAMETERS
'adapter‑params'

Specifies one or more optional adapter parameters that are passed as a string to the adapter. Adapter parameters apply only to the adapter associated with the notifier.

For Kafka notifiers, refer to Kafka and Vertica Configuration Settings.

Privileges

Database Superuser

Examples

Create a Kafka notifier:

=> CREATE NOTIFIER my_dc_notifier
	ACTION 'kafka://172.16.20.10:9092'
	MAXMEMORYSIZE '1G'
	IDENTIFIED BY 'f8b0278a-3282-4e1a-9c86-e0f3f042a971'
	NO CHECK COMMITTED;

Create a notifier with an adapter-specific parameter:

=> CREATE NOTIFIER my_notifier 
	ACTION 'kafka://127.0.0.1:9092' 
	MAXMEMORYSIZE '10M' 
	PARAMETERS 'queue.buffering.max.ms=1000'; 			

See Also