Configuration
This plugin is compatible with DB-less mode.
Compatible protocols
The Kafka Upstream plugin is compatible with the following protocols:
grpc
, grpcs
, http
, https
Parameters
Here's a list of all the parameters which can be used in this plugin's configuration:
-
string required
The name of the plugin, in this case
kafka-upstream
.- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
name
. - If using the KongPlugin object in Kubernetes, the field is
plugin
.
- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
-
string
An optional custom name to identify an instance of the plugin, for example
kafka-upstream_my-service
.The instance name shows up in Kong Manager and in Konnect, so it's useful when running the same plugin in multiple contexts, for example, on multiple services. You can also use it to access a specific plugin instance via the Kong Admin API.
An instance name must be unique within the following context:
- Within a workspace for Kong Gateway Enterprise
- Within a control plane or control plane group for Konnect
- Globally for Kong Gateway (OSS)
-
string
The name or ID of the service the plugin targets. Set one of these parameters if adding the plugin to a service through the top-level
/plugins
endpoint. Not required if using/services/{serviceName|Id}/plugins
. -
string
The name or ID of the route the plugin targets. Set one of these parameters if adding the plugin to a route through the top-level
/plugins
endpoint. Not required if using/routes/{routeName|Id}/plugins
. -
string
The name or ID of the consumer the plugin targets. Set one of these parameters if adding the plugin to a consumer through the top-level
/plugins
endpoint. Not required if using/consumers/{consumerName|Id}/plugins
. -
boolean default:
true
Whether this plugin will be applied.
-
record required
-
set of type
record
-
string required
The Kafka topic to publish to.
-
integer default:
10000
Socket timeout in milliseconds.
-
integer default:
60000
Keepalive timeout in milliseconds.
-
boolean default:
false
-
record required
-
string Must be one of:
sasl
The authentication strategy for the plugin, the only option for the value is
sasl
.
-
string Must be one of:
PLAIN
,SCRAM-SHA-256
,SCRAM-SHA-512
The SASL authentication mechanism. Supported options:
PLAIN
,SCRAM-SHA-256
, orSCRAM-SHA-512
.
-
boolean
Enable this to indicate
DelegationToken
authentication.
-
string referenceable encrypted
Username for SASL authentication.
-
string referenceable encrypted
Password for SASL authentication.
-
-
record required
-
boolean default:
false
Include the request method in the message. At least one of these must be true:
forward_method
,forward_uri
,forward_headers
,forward_body
.
-
boolean default:
false
Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true:
forward_method
,forward_uri
,forward_headers
,forward_body
.
-
boolean default:
false
Include the request headers in the message. At least one of these must be true:
forward_method
,forward_uri
,forward_headers
,forward_body
.
-
boolean default:
true
Include the request body in the message. At least one of these must be true:
forward_method
,forward_uri
,forward_headers
,forward_body
.
-
string
An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a
cluster_name
(that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.
-
integer default:
1
Must be one of:-1
,0
,1
The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).
-
integer default:
2000
Time to wait for a Produce response in milliseconds.
-
integer default:
200
Maximum number of messages to include into a single producer request.
-
integer default:
1048576
Maximum size of a Produce request in bytes.
-
integer default:
10
Maximum number of retry attempts per single Produce request.
-
integer default:
100
Backoff interval between retry attempts in milliseconds.
-
boolean default:
true
Flag to enable asynchronous mode.
-
integer default:
1000
Maximum time interval in milliseconds between buffer flushes in asynchronous mode.
-
integer default:
50000
Maximum number of messages that can be buffered in memory in asynchronous mode.
-