You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5433 lines
267 KiB
5433 lines
267 KiB
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> |
|
<meta content="width=device-width, initial-scale=1" name="viewport"/> |
|
<meta content="#375EAB" name="theme-color"/> |
|
<title> |
|
kafka - Go Documentation Server |
|
</title> |
|
<link href="https://go.dev/css/styles.css" rel="stylesheet" type="text/css"/> |
|
<script> |
|
window.initFuncs = []; |
|
</script> |
|
<script defer="" src="https://go.dev/js/jquery.js"> |
|
</script> |
|
<script> |
|
var goVersion = "go1.14"; |
|
</script> |
|
<script defer="" src="https://go.dev/js/godocs.js"> |
|
</script> |
|
</head> |
|
<body> |
|
<div id="lowframe" style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;"> |
|
... |
|
</div> |
|
<!-- #lowframe --> |
|
<div class="wide" id="page"> |
|
<div class="container"> |
|
<h1> |
|
Package kafka |
|
<span class="text-muted"> |
|
</span> |
|
</h1> |
|
<div id="nav"> |
|
</div> |
|
<!-- |
|
Copyright 2009 The Go Authors. All rights reserved. |
|
Use of this source code is governed by a BSD-style |
|
license that can be found in the LICENSE file. |
|
--> |
|
<!-- |
|
Note: Static (i.e., not template-generated) href and id |
|
attributes start with "pkg-" to make it impossible for |
|
them to conflict with generated attributes (some of which |
|
correspond to Go identifiers). |
|
--> |
|
<script> |
|
document.ANALYSIS_DATA = null; |
|
document.CALLGRAPH = null; |
|
</script> |
|
<div id="short-nav"> |
|
<dl> |
|
<dd> |
|
<code> |
|
import "github.com/confluentinc/confluent-kafka-go/kafka" |
|
</code> |
|
</dd> |
|
</dl> |
|
<dl> |
|
<dd> |
|
<a class="overviewLink" href="#pkg-overview"> |
|
Overview |
|
</a> |
|
</dd> |
|
<dd> |
|
<a class="indexLink" href="#pkg-index"> |
|
Index |
|
</a> |
|
</dd> |
|
<dd> |
|
</dd> |
|
</dl> |
|
</div> |
|
<!-- The package's Name is printed as title by the top-level template --> |
|
<div class="toggleVisible" id="pkg-overview"> |
|
<div class="collapsed"> |
|
<h2 class="toggleButton" title="Click to show Overview section"> |
|
Overview ▹ |
|
</h2> |
|
</div> |
|
<div class="expanded"> |
|
<h2 class="toggleButton" title="Click to hide Overview section"> |
|
Overview ▾ |
|
</h2> |
|
<p> |
|
Package kafka provides high-level Apache Kafka producer and consumers |
|
using bindings on-top of the librdkafka C library. |
|
</p> |
|
<h3 id="hdr-High_level_Consumer"> |
|
High-level Consumer |
|
</h3> |
|
<p> |
|
* Decide if you want to read messages and events by calling `.Poll()` or |
|
the deprecated option of using the `.Events()` channel. (If you want to use |
|
`.Events()` channel then set `"go.events.channel.enable": true`). |
|
</p> |
|
<p> |
|
* Create a Consumer with `kafka.NewConsumer()` providing at |
|
least the `bootstrap.servers` and `group.id` configuration properties. |
|
</p> |
|
<p> |
|
* Call `.Subscribe()` or (`.SubscribeTopics()` to subscribe to multiple topics) |
|
to join the group with the specified subscription set. |
|
Subscriptions are atomic, calling `.Subscribe*()` again will leave |
|
the group and rejoin with the new set of topics. |
|
</p> |
|
<p> |
|
* Start reading events and messages from either the `.Events` channel |
|
or by calling `.Poll()`. |
|
</p> |
|
<p> |
|
* When the group has rebalanced each client member is assigned a |
|
(sub-)set of topic+partitions. |
|
By default the consumer will start fetching messages for its assigned |
|
partitions at this point, but your application may enable rebalance |
|
events to get an insight into what the assigned partitions where |
|
as well as set the initial offsets. To do this you need to pass |
|
`"go.application.rebalance.enable": true` to the `NewConsumer()` call |
|
mentioned above. You will (eventually) see a `kafka.AssignedPartitions` event |
|
with the assigned partition set. You can optionally modify the initial |
|
offsets (they'll default to stored offsets and if there are no previously stored |
|
offsets it will fall back to `"auto.offset.reset"` |
|
which defaults to the `latest` message) and then call `.Assign(partitions)` |
|
to start consuming. If you don't need to modify the initial offsets you will |
|
not need to call `.Assign()`, the client will do so automatically for you if |
|
you dont, unless you are using the channel-based consumer in which case |
|
you MUST call `.Assign()` when receiving the `AssignedPartitions` and |
|
`RevokedPartitions` events. |
|
</p> |
|
<p> |
|
* As messages are fetched they will be made available on either the |
|
`.Events` channel or by calling `.Poll()`, look for event type `*kafka.Message`. |
|
</p> |
|
<p> |
|
* Handle messages, events and errors to your liking. |
|
</p> |
|
<p> |
|
* When you are done consuming call `.Close()` to commit final offsets |
|
and leave the consumer group. |
|
</p> |
|
<h3 id="hdr-Producer"> |
|
Producer |
|
</h3> |
|
<p> |
|
* Create a Producer with `kafka.NewProducer()` providing at least |
|
the `bootstrap.servers` configuration properties. |
|
</p> |
|
<p> |
|
* Messages may now be produced either by sending a `*kafka.Message` |
|
on the `.ProduceChannel` or by calling `.Produce()`. |
|
</p> |
|
<p> |
|
* Producing is an asynchronous operation so the client notifies the application |
|
of per-message produce success or failure through something called delivery reports. |
|
Delivery reports are by default emitted on the `.Events()` channel as `*kafka.Message` |
|
and you should check `msg.TopicPartition.Error` for `nil` to find out if the message |
|
was succesfully delivered or not. |
|
It is also possible to direct delivery reports to alternate channels |
|
by providing a non-nil `chan Event` channel to `.Produce()`. |
|
If no delivery reports are wanted they can be completely disabled by |
|
setting configuration property `"go.delivery.reports": false`. |
|
</p> |
|
<p> |
|
* When you are done producing messages you will need to make sure all messages |
|
are indeed delivered to the broker (or failed), remember that this is |
|
an asynchronous client so some of your messages may be lingering in internal |
|
channels or tranmission queues. |
|
To do this you can either keep track of the messages you've produced |
|
and wait for their corresponding delivery reports, or call the convenience |
|
function `.Flush()` that will block until all message deliveries are done |
|
or the provided timeout elapses. |
|
</p> |
|
<p> |
|
* Finally call `.Close()` to decommission the producer. |
|
</p> |
|
<h3 id="hdr-Transactional_producer_API"> |
|
Transactional producer API |
|
</h3> |
|
<p> |
|
The transactional producer operates on top of the idempotent producer, |
|
and provides full exactly-once semantics (EOS) for Apache Kafka when used |
|
with the transaction aware consumer (`isolation.level=read_committed`). |
|
</p> |
|
<p> |
|
A producer instance is configured for transactions by setting the |
|
`transactional.id` to an identifier unique for the application. This |
|
id will be used to fence stale transactions from previous instances of |
|
the application, typically following an outage or crash. |
|
</p> |
|
<p> |
|
After creating the transactional producer instance using `NewProducer()` |
|
the transactional state must be initialized by calling |
|
`InitTransactions()`. This is a blocking call that will |
|
acquire a runtime producer id from the transaction coordinator broker |
|
as well as abort any stale transactions and fence any still running producer |
|
instances with the same `transactional.id`. |
|
</p> |
|
<p> |
|
Once transactions are initialized the application may begin a new |
|
transaction by calling `BeginTransaction()`. |
|
A producer instance may only have one single on-going transaction. |
|
</p> |
|
<p> |
|
Any messages produced after the transaction has been started will |
|
belong to the ongoing transaction and will be committed or aborted |
|
atomically. |
|
It is not permitted to produce messages outside a transaction |
|
boundary, e.g., before `BeginTransaction()` or after `CommitTransaction()`, |
|
`AbortTransaction()` or if the current transaction has failed. |
|
</p> |
|
<p> |
|
If consumed messages are used as input to the transaction, the consumer |
|
instance must be configured with `enable.auto.commit` set to `false`. |
|
To commit the consumed offsets along with the transaction pass the |
|
list of consumed partitions and the last offset processed + 1 to |
|
`SendOffsetsToTransaction()` prior to committing the transaction. |
|
This allows an aborted transaction to be restarted using the previously |
|
committed offsets. |
|
</p> |
|
<p> |
|
To commit the produced messages, and any consumed offsets, to the |
|
current transaction, call `CommitTransaction()`. |
|
This call will block until the transaction has been fully committed or |
|
failed (typically due to fencing by a newer producer instance). |
|
</p> |
|
<p> |
|
Alternatively, if processing fails, or an abortable transaction error is |
|
raised, the transaction needs to be aborted by calling |
|
`AbortTransaction()` which marks any produced messages and |
|
offset commits as aborted. |
|
</p> |
|
<p> |
|
After the current transaction has been committed or aborted a new |
|
transaction may be started by calling `BeginTransaction()` again. |
|
</p> |
|
<p> |
|
Retriable errors: |
|
Some error cases allow the attempted operation to be retried, this is |
|
indicated by the error object having the retriable flag set which can |
|
be detected by calling `err.(kafka.Error).IsRetriable()`. |
|
When this flag is set the application may retry the operation immediately |
|
or preferably after a shorter grace period (to avoid busy-looping). |
|
Retriable errors include timeouts, broker transport failures, etc. |
|
</p> |
|
<p> |
|
Abortable errors: |
|
An ongoing transaction may fail permanently due to various errors, |
|
such as transaction coordinator becoming unavailable, write failures to the |
|
Apache Kafka log, under-replicated partitions, etc. |
|
At this point the producer application must abort the current transaction |
|
using `AbortTransaction()` and optionally start a new transaction |
|
by calling `BeginTransaction()`. |
|
Whether an error is abortable or not is detected by calling |
|
`err.(kafka.Error).TxnRequiresAbort()` on the returned error object. |
|
</p> |
|
<p> |
|
Fatal errors: |
|
While the underlying idempotent producer will typically only raise |
|
fatal errors for unrecoverable cluster errors where the idempotency |
|
guarantees can't be maintained, most of these are treated as abortable by |
|
the transactional producer since transactions may be aborted and retried |
|
in their entirety; |
|
The transactional producer on the other hand introduces a set of additional |
|
fatal errors which the application needs to handle by shutting down the |
|
producer and terminate. There is no way for a producer instance to recover |
|
from fatal errors. |
|
Whether an error is fatal or not is detected by calling |
|
`err.(kafka.Error).IsFatal()` on the returned error object or by checking |
|
the global `GetFatalError()`. |
|
</p> |
|
<p> |
|
Handling of other errors: |
|
For errors that have neither retriable, abortable or the fatal flag set |
|
it is not always obvious how to handle them. While some of these errors |
|
may be indicative of bugs in the application code, such as when |
|
an invalid parameter is passed to a method, other errors might originate |
|
from the broker and be passed thru as-is to the application. |
|
The general recommendation is to treat these errors, that have |
|
neither the retriable or abortable flags set, as fatal. |
|
</p> |
|
<p> |
|
Error handling example: |
|
</p> |
|
<pre>retry: |
|
|
|
err := producer.CommitTransaction(...) |
|
if err == nil { |
|
return nil |
|
} else if err.(kafka.Error).TxnRequiresAbort() { |
|
do_abort_transaction_and_reset_inputs() |
|
} else if err.(kafka.Error).IsRetriable() { |
|
goto retry |
|
} else { // treat all other errors as fatal errors |
|
panic(err) |
|
} |
|
</pre> |
|
<h3 id="hdr-Events"> |
|
Events |
|
</h3> |
|
<p> |
|
Apart from emitting messages and delivery reports the client also communicates |
|
with the application through a number of different event types. |
|
An application may choose to handle or ignore these events. |
|
</p> |
|
<h3 id="hdr-Consumer_events"> |
|
Consumer events |
|
</h3> |
|
<p> |
|
* `*kafka.Message` - a fetched message. |
|
</p> |
|
<p> |
|
* `AssignedPartitions` - The assigned partition set for this client following a rebalance. |
|
Requires `go.application.rebalance.enable` |
|
</p> |
|
<p> |
|
* `RevokedPartitions` - The counter part to `AssignedPartitions` following a rebalance. |
|
`AssignedPartitions` and `RevokedPartitions` are symmetrical. |
|
Requires `go.application.rebalance.enable` |
|
</p> |
|
<p> |
|
* `PartitionEOF` - Consumer has reached the end of a partition. |
|
NOTE: The consumer will keep trying to fetch new messages for the partition. |
|
</p> |
|
<p> |
|
* `OffsetsCommitted` - Offset commit results (when `enable.auto.commit` is enabled). |
|
</p> |
|
<h3 id="hdr-Producer_events"> |
|
Producer events |
|
</h3> |
|
<p> |
|
* `*kafka.Message` - delivery report for produced message. |
|
Check `.TopicPartition.Error` for delivery result. |
|
</p> |
|
<h3 id="hdr-Generic_events_for_both_Consumer_and_Producer"> |
|
Generic events for both Consumer and Producer |
|
</h3> |
|
<p> |
|
* `KafkaError` - client (error codes are prefixed with _) or broker error. |
|
These errors are normally just informational since the |
|
client will try its best to automatically recover (eventually). |
|
</p> |
|
<p> |
|
* `OAuthBearerTokenRefresh` - retrieval of a new SASL/OAUTHBEARER token is required. |
|
This event only occurs with sasl.mechanism=OAUTHBEARER. |
|
Be sure to invoke SetOAuthBearerToken() on the Producer/Consumer/AdminClient |
|
instance when a successful token retrieval is completed, otherwise be sure to |
|
invoke SetOAuthBearerTokenFailure() to indicate that retrieval failed (or |
|
if setting the token failed, which could happen if an extension doesn't meet |
|
the required regular expression); invoking SetOAuthBearerTokenFailure() will |
|
schedule a new event for 10 seconds later so another retrieval can be attempted. |
|
</p> |
|
<p> |
|
Hint: If your application registers a signal notification |
|
(signal.Notify) makes sure the signals channel is buffered to avoid |
|
possible complications with blocking Poll() calls. |
|
</p> |
|
<p> |
|
Note: The Confluent Kafka Go client is safe for concurrent use. |
|
</p> |
|
</div> |
|
</div> |
|
<div class="toggleVisible" id="pkg-index"> |
|
<div class="collapsed"> |
|
<h2 class="toggleButton" title="Click to show Index section"> |
|
Index ▹ |
|
</h2> |
|
</div> |
|
<div class="expanded"> |
|
<h2 class="toggleButton" title="Click to hide Index section"> |
|
Index ▾ |
|
</h2> |
|
<!-- Table of contents for API; must be named manual-nav to turn off auto nav. --> |
|
<div id="manual-nav"> |
|
<dl> |
|
<dd> |
|
<a href="#pkg-constants"> |
|
Constants |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#LibraryVersion"> |
|
func LibraryVersion() (int, string) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#WriteErrorCodes"> |
|
func WriteErrorCodes(f *os.File) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLBinding"> |
|
type ACLBinding |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLBindingFilter"> |
|
type ACLBindingFilter |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLBindingFilters"> |
|
type ACLBindingFilters |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLBindings"> |
|
type ACLBindings |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLBindings.Len"> |
|
func (a ACLBindings) Len() int |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLBindings.Less"> |
|
func (a ACLBindings) Less(i, j int) bool |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLBindings.Swap"> |
|
func (a ACLBindings) Swap(i, j int) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLOperation"> |
|
type ACLOperation |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLOperationFromString"> |
|
func ACLOperationFromString(aclOperationString string) (ACLOperation, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLOperation.String"> |
|
func (o ACLOperation) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLPermissionType"> |
|
type ACLPermissionType |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLPermissionTypeFromString"> |
|
func ACLPermissionTypeFromString(aclPermissionTypeString string) (ACLPermissionType, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ACLPermissionType.String"> |
|
func (o ACLPermissionType) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient"> |
|
type AdminClient |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewAdminClient"> |
|
func NewAdminClient(conf *ConfigMap) (*AdminClient, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewAdminClientFromConsumer"> |
|
func NewAdminClientFromConsumer(c *Consumer) (a *AdminClient, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewAdminClientFromProducer"> |
|
func NewAdminClientFromProducer(p *Producer) (a *AdminClient, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.AlterConfigs"> |
|
func (a *AdminClient) AlterConfigs(ctx context.Context, resources []ConfigResource, options ...AlterConfigsAdminOption) (result []ConfigResourceResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.Close"> |
|
func (a *AdminClient) Close() |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.ClusterID"> |
|
func (a *AdminClient) ClusterID(ctx context.Context) (clusterID string, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.ControllerID"> |
|
func (a *AdminClient) ControllerID(ctx context.Context) (controllerID int32, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.CreateACLs"> |
|
func (a *AdminClient) CreateACLs(ctx context.Context, aclBindings ACLBindings, options ...CreateACLsAdminOption) (result []CreateACLResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.CreatePartitions"> |
|
func (a *AdminClient) CreatePartitions(ctx context.Context, partitions []PartitionsSpecification, options ...CreatePartitionsAdminOption) (result []TopicResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.CreateTopics"> |
|
func (a *AdminClient) CreateTopics(ctx context.Context, topics []TopicSpecification, options ...CreateTopicsAdminOption) (result []TopicResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.DeleteACLs"> |
|
func (a *AdminClient) DeleteACLs(ctx context.Context, aclBindingFilters ACLBindingFilters, options ...DeleteACLsAdminOption) (result []DeleteACLsResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.DeleteTopics"> |
|
func (a *AdminClient) DeleteTopics(ctx context.Context, topics []string, options ...DeleteTopicsAdminOption) (result []TopicResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.DescribeACLs"> |
|
func (a *AdminClient) DescribeACLs(ctx context.Context, aclBindingFilter ACLBindingFilter, options ...DescribeACLsAdminOption) (result *DescribeACLsResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.DescribeConfigs"> |
|
func (a *AdminClient) DescribeConfigs(ctx context.Context, resources []ConfigResource, options ...DescribeConfigsAdminOption) (result []ConfigResourceResult, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.GetMetadata"> |
|
func (a *AdminClient) GetMetadata(topic *string, allTopics bool, timeoutMs int) (*Metadata, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.SetOAuthBearerToken"> |
|
func (a *AdminClient) SetOAuthBearerToken(oauthBearerToken OAuthBearerToken) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.SetOAuthBearerTokenFailure"> |
|
func (a *AdminClient) SetOAuthBearerTokenFailure(errstr string) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminClient.String"> |
|
func (a *AdminClient) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminOption"> |
|
type AdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminOptionOperationTimeout"> |
|
type AdminOptionOperationTimeout |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#SetAdminOperationTimeout"> |
|
func SetAdminOperationTimeout(t time.Duration) (ao AdminOptionOperationTimeout) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminOptionRequestTimeout"> |
|
type AdminOptionRequestTimeout |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#SetAdminRequestTimeout"> |
|
func SetAdminRequestTimeout(t time.Duration) (ao AdminOptionRequestTimeout) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AdminOptionValidateOnly"> |
|
type AdminOptionValidateOnly |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#SetAdminValidateOnly"> |
|
func SetAdminValidateOnly(validateOnly bool) (ao AdminOptionValidateOnly) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AlterConfigsAdminOption"> |
|
type AlterConfigsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AlterOperation"> |
|
type AlterOperation |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AlterOperation.String"> |
|
func (o AlterOperation) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AssignedPartitions"> |
|
type AssignedPartitions |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#AssignedPartitions.String"> |
|
func (e AssignedPartitions) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#BrokerMetadata"> |
|
type BrokerMetadata |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigEntry"> |
|
type ConfigEntry |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#StringMapToConfigEntries"> |
|
func StringMapToConfigEntries(stringMap map[string]string, operation AlterOperation) []ConfigEntry |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigEntry.String"> |
|
func (c ConfigEntry) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigEntryResult"> |
|
type ConfigEntryResult |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigEntryResult.String"> |
|
func (c ConfigEntryResult) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigMap"> |
|
type ConfigMap |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigMap.Get"> |
|
func (m ConfigMap) Get(key string, defval ConfigValue) (ConfigValue, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigMap.Set"> |
|
func (m ConfigMap) Set(kv string) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigMap.SetKey"> |
|
func (m ConfigMap) SetKey(key string, value ConfigValue) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigResource"> |
|
type ConfigResource |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigResource.String"> |
|
func (c ConfigResource) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigResourceResult"> |
|
type ConfigResourceResult |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigResourceResult.String"> |
|
func (c ConfigResourceResult) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigSource"> |
|
type ConfigSource |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigSource.String"> |
|
func (t ConfigSource) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConfigValue"> |
|
type ConfigValue |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer"> |
|
type Consumer |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewConsumer"> |
|
func NewConsumer(conf *ConfigMap) (*Consumer, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Assign"> |
|
func (c *Consumer) Assign(partitions []TopicPartition) (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Assignment"> |
|
func (c *Consumer) Assignment() (partitions []TopicPartition, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.AssignmentLost"> |
|
func (c *Consumer) AssignmentLost() bool |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Close"> |
|
func (c *Consumer) Close() (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Commit"> |
|
func (c *Consumer) Commit() ([]TopicPartition, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.CommitMessage"> |
|
func (c *Consumer) CommitMessage(m *Message) ([]TopicPartition, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.CommitOffsets"> |
|
func (c *Consumer) CommitOffsets(offsets []TopicPartition) ([]TopicPartition, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Committed"> |
|
func (c *Consumer) Committed(partitions []TopicPartition, timeoutMs int) (offsets []TopicPartition, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Events"> |
|
func (c *Consumer) Events() chan Event |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.GetConsumerGroupMetadata"> |
|
func (c *Consumer) GetConsumerGroupMetadata() (*ConsumerGroupMetadata, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.GetMetadata"> |
|
func (c *Consumer) GetMetadata(topic *string, allTopics bool, timeoutMs int) (*Metadata, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.GetRebalanceProtocol"> |
|
func (c *Consumer) GetRebalanceProtocol() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.GetWatermarkOffsets"> |
|
func (c *Consumer) GetWatermarkOffsets(topic string, partition int32) (low, high int64, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.IncrementalAssign"> |
|
func (c *Consumer) IncrementalAssign(partitions []TopicPartition) (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.IncrementalUnassign"> |
|
func (c *Consumer) IncrementalUnassign(partitions []TopicPartition) (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Logs"> |
|
func (c *Consumer) Logs() chan LogEvent |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.OffsetsForTimes"> |
|
func (c *Consumer) OffsetsForTimes(times []TopicPartition, timeoutMs int) (offsets []TopicPartition, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Pause"> |
|
func (c *Consumer) Pause(partitions []TopicPartition) (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Poll"> |
|
func (c *Consumer) Poll(timeoutMs int) (event Event) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Position"> |
|
func (c *Consumer) Position(partitions []TopicPartition) (offsets []TopicPartition, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.QueryWatermarkOffsets"> |
|
func (c *Consumer) QueryWatermarkOffsets(topic string, partition int32, timeoutMs int) (low, high int64, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.ReadMessage"> |
|
func (c *Consumer) ReadMessage(timeout time.Duration) (*Message, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Resume"> |
|
func (c *Consumer) Resume(partitions []TopicPartition) (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Seek"> |
|
func (c *Consumer) Seek(partition TopicPartition, timeoutMs int) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.SetOAuthBearerToken"> |
|
func (c *Consumer) SetOAuthBearerToken(oauthBearerToken OAuthBearerToken) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.SetOAuthBearerTokenFailure"> |
|
func (c *Consumer) SetOAuthBearerTokenFailure(errstr string) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.StoreMessage"> |
|
func (c *Consumer) StoreMessage(m *Message) (storedOffsets []TopicPartition, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.StoreOffsets"> |
|
func (c *Consumer) StoreOffsets(offsets []TopicPartition) (storedOffsets []TopicPartition, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.String"> |
|
func (c *Consumer) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Subscribe"> |
|
func (c *Consumer) Subscribe(topic string, rebalanceCb RebalanceCb) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.SubscribeTopics"> |
|
func (c *Consumer) SubscribeTopics(topics []string, rebalanceCb RebalanceCb) (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Subscription"> |
|
func (c *Consumer) Subscription() (topics []string, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Unassign"> |
|
func (c *Consumer) Unassign() (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Consumer.Unsubscribe"> |
|
func (c *Consumer) Unsubscribe() (err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ConsumerGroupMetadata"> |
|
type ConsumerGroupMetadata |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewTestConsumerGroupMetadata"> |
|
func NewTestConsumerGroupMetadata(groupID string) (*ConsumerGroupMetadata, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#CreateACLResult"> |
|
type CreateACLResult |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#CreateACLsAdminOption"> |
|
type CreateACLsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#CreatePartitionsAdminOption"> |
|
type CreatePartitionsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#CreateTopicsAdminOption"> |
|
type CreateTopicsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#DeleteACLsAdminOption"> |
|
type DeleteACLsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#DeleteACLsResult"> |
|
type DeleteACLsResult |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#DeleteTopicsAdminOption"> |
|
type DeleteTopicsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#DescribeACLsAdminOption"> |
|
type DescribeACLsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#DescribeACLsResult"> |
|
type DescribeACLsResult |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#DescribeConfigsAdminOption"> |
|
type DescribeConfigsAdminOption |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Error"> |
|
type Error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewError"> |
|
func NewError(code ErrorCode, str string, fatal bool) (err Error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Error.Code"> |
|
func (e Error) Code() ErrorCode |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Error.Error"> |
|
func (e Error) Error() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Error.IsFatal"> |
|
func (e Error) IsFatal() bool |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Error.IsRetriable"> |
|
func (e Error) IsRetriable() bool |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Error.String"> |
|
func (e Error) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Error.TxnRequiresAbort"> |
|
func (e Error) TxnRequiresAbort() bool |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ErrorCode"> |
|
type ErrorCode |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ErrorCode.String"> |
|
func (c ErrorCode) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Event"> |
|
type Event |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Handle"> |
|
type Handle |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Header"> |
|
type Header |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Header.String"> |
|
func (h Header) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#LogEvent"> |
|
type LogEvent |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#LogEvent.String"> |
|
func (logEvent LogEvent) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Message"> |
|
type Message |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Message.String"> |
|
func (m *Message) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Metadata"> |
|
type Metadata |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#MockCluster"> |
|
type MockCluster |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewMockCluster"> |
|
func NewMockCluster(brokerCount int) (*MockCluster, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#MockCluster.BootstrapServers"> |
|
func (mc *MockCluster) BootstrapServers() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#MockCluster.Close"> |
|
func (mc *MockCluster) Close() |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#OAuthBearerToken"> |
|
type OAuthBearerToken |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#OAuthBearerTokenRefresh"> |
|
type OAuthBearerTokenRefresh |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#OAuthBearerTokenRefresh.String"> |
|
func (o OAuthBearerTokenRefresh) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Offset"> |
|
type Offset |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewOffset"> |
|
func NewOffset(offset interface{}) (Offset, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#OffsetTail"> |
|
func OffsetTail(relativeOffset Offset) Offset |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Offset.Set"> |
|
func (o *Offset) Set(offset interface{}) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Offset.String"> |
|
func (o Offset) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#OffsetsCommitted"> |
|
type OffsetsCommitted |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#OffsetsCommitted.String"> |
|
func (o OffsetsCommitted) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#PartitionEOF"> |
|
type PartitionEOF |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#PartitionEOF.String"> |
|
func (p PartitionEOF) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#PartitionMetadata"> |
|
type PartitionMetadata |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#PartitionsSpecification"> |
|
type PartitionsSpecification |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer"> |
|
type Producer |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#NewProducer"> |
|
func NewProducer(conf *ConfigMap) (*Producer, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.AbortTransaction"> |
|
func (p *Producer) AbortTransaction(ctx context.Context) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.BeginTransaction"> |
|
func (p *Producer) BeginTransaction() error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.Close"> |
|
func (p *Producer) Close() |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.CommitTransaction"> |
|
func (p *Producer) CommitTransaction(ctx context.Context) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.Events"> |
|
func (p *Producer) Events() chan Event |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.Flush"> |
|
func (p *Producer) Flush(timeoutMs int) int |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.GetFatalError"> |
|
func (p *Producer) GetFatalError() error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.GetMetadata"> |
|
func (p *Producer) GetMetadata(topic *string, allTopics bool, timeoutMs int) (*Metadata, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.InitTransactions"> |
|
func (p *Producer) InitTransactions(ctx context.Context) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.Len"> |
|
func (p *Producer) Len() int |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.Logs"> |
|
func (p *Producer) Logs() chan LogEvent |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.OffsetsForTimes"> |
|
func (p *Producer) OffsetsForTimes(times []TopicPartition, timeoutMs int) (offsets []TopicPartition, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.Produce"> |
|
func (p *Producer) Produce(msg *Message, deliveryChan chan Event) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.ProduceChannel"> |
|
func (p *Producer) ProduceChannel() chan *Message |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.Purge"> |
|
func (p *Producer) Purge(flags int) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.QueryWatermarkOffsets"> |
|
func (p *Producer) QueryWatermarkOffsets(topic string, partition int32, timeoutMs int) (low, high int64, err error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.SendOffsetsToTransaction"> |
|
func (p *Producer) SendOffsetsToTransaction(ctx context.Context, offsets []TopicPartition, consumerMetadata *ConsumerGroupMetadata) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.SetOAuthBearerToken"> |
|
func (p *Producer) SetOAuthBearerToken(oauthBearerToken OAuthBearerToken) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.SetOAuthBearerTokenFailure"> |
|
func (p *Producer) SetOAuthBearerTokenFailure(errstr string) error |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.String"> |
|
func (p *Producer) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Producer.TestFatalError"> |
|
func (p *Producer) TestFatalError(code ErrorCode, str string) ErrorCode |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#RebalanceCb"> |
|
type RebalanceCb |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ResourcePatternType"> |
|
type ResourcePatternType |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ResourcePatternTypeFromString"> |
|
func ResourcePatternTypeFromString(patternTypeString string) (ResourcePatternType, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ResourcePatternType.String"> |
|
func (t ResourcePatternType) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ResourceType"> |
|
type ResourceType |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ResourceTypeFromString"> |
|
func ResourceTypeFromString(typeString string) (ResourceType, error) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#ResourceType.String"> |
|
func (t ResourceType) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#RevokedPartitions"> |
|
type RevokedPartitions |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#RevokedPartitions.String"> |
|
func (e RevokedPartitions) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Stats"> |
|
type Stats |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#Stats.String"> |
|
func (e Stats) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TimestampType"> |
|
type TimestampType |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TimestampType.String"> |
|
func (t TimestampType) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicMetadata"> |
|
type TopicMetadata |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicPartition"> |
|
type TopicPartition |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicPartition.String"> |
|
func (p TopicPartition) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicPartitions"> |
|
type TopicPartitions |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicPartitions.Len"> |
|
func (tps TopicPartitions) Len() int |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicPartitions.Less"> |
|
func (tps TopicPartitions) Less(i, j int) bool |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicPartitions.Swap"> |
|
func (tps TopicPartitions) Swap(i, j int) |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicResult"> |
|
type TopicResult |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicResult.String"> |
|
func (t TopicResult) String() string |
|
</a> |
|
</dd> |
|
<dd> |
|
<a href="#TopicSpecification"> |
|
type TopicSpecification |
|
</a> |
|
</dd> |
|
</dl> |
|
</div> |
|
<!-- #manual-nav --> |
|
<h3> |
|
Package files |
|
</h3> |
|
<p> |
|
<span style="font-size:90%"> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/00version.go"> |
|
00version.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go"> |
|
adminapi.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go"> |
|
adminoptions.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/build_glibc_linux.go"> |
|
build_glibc_linux.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/config.go"> |
|
config.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go"> |
|
consumer.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/context.go"> |
|
context.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go"> |
|
error.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error_gen.go"> |
|
error_gen.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go"> |
|
event.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/generated_errors.go"> |
|
generated_errors.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/handle.go"> |
|
handle.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/header.go"> |
|
header.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go"> |
|
kafka.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/log.go"> |
|
log.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/message.go"> |
|
message.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/metadata.go"> |
|
metadata.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/misc.go"> |
|
misc.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/mockcluster.go"> |
|
mockcluster.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/offset.go"> |
|
offset.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go"> |
|
producer.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/testhelpers.go"> |
|
testhelpers.go |
|
</a> |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/time.go"> |
|
time.go |
|
</a> |
|
</span> |
|
</p> |
|
</div> |
|
<!-- .expanded --> |
|
</div> |
|
<!-- #pkg-index --> |
|
<h2 id="pkg-constants"> |
|
Constants |
|
</h2> |
|
<pre>const ( |
|
<span class="comment">// ResourceUnknown - Unknown</span> |
|
<span id="ResourceUnknown">ResourceUnknown</span> = <a href="#ResourceType">ResourceType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_UNKNOWN">RD_KAFKA_RESOURCE_UNKNOWN</a>) |
|
<span class="comment">// ResourceAny - match any resource type (DescribeConfigs)</span> |
|
<span id="ResourceAny">ResourceAny</span> = <a href="#ResourceType">ResourceType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_ANY">RD_KAFKA_RESOURCE_ANY</a>) |
|
<span class="comment">// ResourceTopic - Topic</span> |
|
<span id="ResourceTopic">ResourceTopic</span> = <a href="#ResourceType">ResourceType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_TOPIC">RD_KAFKA_RESOURCE_TOPIC</a>) |
|
<span class="comment">// ResourceGroup - Group</span> |
|
<span id="ResourceGroup">ResourceGroup</span> = <a href="#ResourceType">ResourceType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_GROUP">RD_KAFKA_RESOURCE_GROUP</a>) |
|
<span class="comment">// ResourceBroker - Broker</span> |
|
<span id="ResourceBroker">ResourceBroker</span> = <a href="#ResourceType">ResourceType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_BROKER">RD_KAFKA_RESOURCE_BROKER</a>) |
|
)</pre> |
|
<pre>const ( |
|
<span class="comment">// ConfigSourceUnknown is the default value</span> |
|
<span id="ConfigSourceUnknown">ConfigSourceUnknown</span> = <a href="#ConfigSource">ConfigSource</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG">RD_KAFKA_CONFIG_SOURCE_UNKNOWN_CONFIG</a>) |
|
<span class="comment">// ConfigSourceDynamicTopic is dynamic topic config that is configured for a specific topic</span> |
|
<span id="ConfigSourceDynamicTopic">ConfigSourceDynamicTopic</span> = <a href="#ConfigSource">ConfigSource</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG">RD_KAFKA_CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG</a>) |
|
<span class="comment">// ConfigSourceDynamicBroker is dynamic broker config that is configured for a specific broker</span> |
|
<span id="ConfigSourceDynamicBroker">ConfigSourceDynamicBroker</span> = <a href="#ConfigSource">ConfigSource</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG">RD_KAFKA_CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG</a>) |
|
<span class="comment">// ConfigSourceDynamicDefaultBroker is dynamic broker config that is configured as default for all brokers in the cluster</span> |
|
<span id="ConfigSourceDynamicDefaultBroker">ConfigSourceDynamicDefaultBroker</span> = <a href="#ConfigSource">ConfigSource</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG">RD_KAFKA_CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG</a>) |
|
<span class="comment">// ConfigSourceStaticBroker is static broker config provided as broker properties at startup (e.g. from server.properties file)</span> |
|
<span id="ConfigSourceStaticBroker">ConfigSourceStaticBroker</span> = <a href="#ConfigSource">ConfigSource</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG">RD_KAFKA_CONFIG_SOURCE_STATIC_BROKER_CONFIG</a>) |
|
<span class="comment">// ConfigSourceDefault is built-in default configuration for configs that have a default value</span> |
|
<span id="ConfigSourceDefault">ConfigSourceDefault</span> = <a href="#ConfigSource">ConfigSource</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG">RD_KAFKA_CONFIG_SOURCE_DEFAULT_CONFIG</a>) |
|
)</pre> |
|
<pre>const ( |
|
<span class="comment">// ResourcePatternTypeUnknown is a resource pattern type not known or not set.</span> |
|
<span id="ResourcePatternTypeUnknown">ResourcePatternTypeUnknown</span> = <a href="#ResourcePatternType">ResourcePatternType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_PATTERN_UNKNOWN">RD_KAFKA_RESOURCE_PATTERN_UNKNOWN</a>) |
|
<span class="comment">// ResourcePatternTypeAny matches any resource, used for lookups.</span> |
|
<span id="ResourcePatternTypeAny">ResourcePatternTypeAny</span> = <a href="#ResourcePatternType">ResourcePatternType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_PATTERN_ANY">RD_KAFKA_RESOURCE_PATTERN_ANY</a>) |
|
<span class="comment">// ResourcePatternTypeMatch will perform pattern matching</span> |
|
<span id="ResourcePatternTypeMatch">ResourcePatternTypeMatch</span> = <a href="#ResourcePatternType">ResourcePatternType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_PATTERN_MATCH">RD_KAFKA_RESOURCE_PATTERN_MATCH</a>) |
|
<span class="comment">// ResourcePatternTypeLiteral matches a literal resource name</span> |
|
<span id="ResourcePatternTypeLiteral">ResourcePatternTypeLiteral</span> = <a href="#ResourcePatternType">ResourcePatternType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_PATTERN_LITERAL">RD_KAFKA_RESOURCE_PATTERN_LITERAL</a>) |
|
<span class="comment">// ResourcePatternTypePrefixed matches a prefixed resource name</span> |
|
<span id="ResourcePatternTypePrefixed">ResourcePatternTypePrefixed</span> = <a href="#ResourcePatternType">ResourcePatternType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESOURCE_PATTERN_PREFIXED">RD_KAFKA_RESOURCE_PATTERN_PREFIXED</a>) |
|
)</pre> |
|
<pre>const ( |
|
<span class="comment">// ACLOperationUnknown represents an unknown or unset operation</span> |
|
<span id="ACLOperationUnknown">ACLOperationUnknown</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_UNKNOWN">RD_KAFKA_ACL_OPERATION_UNKNOWN</a>) |
|
<span class="comment">// ACLOperationAny in a filter, matches any ACLOperation</span> |
|
<span id="ACLOperationAny">ACLOperationAny</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_ANY">RD_KAFKA_ACL_OPERATION_ANY</a>) |
|
<span class="comment">// ACLOperationAll represents all the operations</span> |
|
<span id="ACLOperationAll">ACLOperationAll</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_ALL">RD_KAFKA_ACL_OPERATION_ALL</a>) |
|
<span class="comment">// ACLOperationRead a read operation</span> |
|
<span id="ACLOperationRead">ACLOperationRead</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_READ">RD_KAFKA_ACL_OPERATION_READ</a>) |
|
<span class="comment">// ACLOperationWrite represents a write operation</span> |
|
<span id="ACLOperationWrite">ACLOperationWrite</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_WRITE">RD_KAFKA_ACL_OPERATION_WRITE</a>) |
|
<span class="comment">// ACLOperationCreate represents a create operation</span> |
|
<span id="ACLOperationCreate">ACLOperationCreate</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_CREATE">RD_KAFKA_ACL_OPERATION_CREATE</a>) |
|
<span class="comment">// ACLOperationDelete represents a delete operation</span> |
|
<span id="ACLOperationDelete">ACLOperationDelete</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_DELETE">RD_KAFKA_ACL_OPERATION_DELETE</a>) |
|
<span class="comment">// ACLOperationAlter represents an alter operation</span> |
|
<span id="ACLOperationAlter">ACLOperationAlter</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_ALTER">RD_KAFKA_ACL_OPERATION_ALTER</a>) |
|
<span class="comment">// ACLOperationDescribe represents a describe operation</span> |
|
<span id="ACLOperationDescribe">ACLOperationDescribe</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_DESCRIBE">RD_KAFKA_ACL_OPERATION_DESCRIBE</a>) |
|
<span class="comment">// ACLOperationClusterAction represents a cluster action operation</span> |
|
<span id="ACLOperationClusterAction">ACLOperationClusterAction</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION">RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION</a>) |
|
<span class="comment">// ACLOperationDescribeConfigs represents a describe configs operation</span> |
|
<span id="ACLOperationDescribeConfigs">ACLOperationDescribeConfigs</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS">RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS</a>) |
|
<span class="comment">// ACLOperationAlterConfigs represents an alter configs operation</span> |
|
<span id="ACLOperationAlterConfigs">ACLOperationAlterConfigs</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS">RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS</a>) |
|
<span class="comment">// ACLOperationIdempotentWrite represents an idempotent write operation</span> |
|
<span id="ACLOperationIdempotentWrite">ACLOperationIdempotentWrite</span> = <a href="#ACLOperation">ACLOperation</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE">RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE</a>) |
|
)</pre> |
|
<pre>const ( |
|
<span class="comment">// ACLPermissionTypeUnknown represents an unknown ACLPermissionType</span> |
|
<span id="ACLPermissionTypeUnknown">ACLPermissionTypeUnknown</span> = <a href="#ACLPermissionType">ACLPermissionType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN">RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN</a>) |
|
<span class="comment">// ACLPermissionTypeAny in a filter, matches any ACLPermissionType</span> |
|
<span id="ACLPermissionTypeAny">ACLPermissionTypeAny</span> = <a href="#ACLPermissionType">ACLPermissionType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_PERMISSION_TYPE_ANY">RD_KAFKA_ACL_PERMISSION_TYPE_ANY</a>) |
|
<span class="comment">// ACLPermissionTypeDeny disallows access</span> |
|
<span id="ACLPermissionTypeDeny">ACLPermissionTypeDeny</span> = <a href="#ACLPermissionType">ACLPermissionType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_PERMISSION_TYPE_DENY">RD_KAFKA_ACL_PERMISSION_TYPE_DENY</a>) |
|
<span class="comment">// ACLPermissionTypeAllow grants access</span> |
|
<span id="ACLPermissionTypeAllow">ACLPermissionTypeAllow</span> = <a href="#ACLPermissionType">ACLPermissionType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW">RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW</a>) |
|
)</pre> |
|
<pre>const ( |
|
<span class="comment">// TimestampNotAvailable indicates no timestamp was set, or not available due to lacking broker support</span> |
|
<span id="TimestampNotAvailable">TimestampNotAvailable</span> = <a href="#TimestampType">TimestampType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_TIMESTAMP_NOT_AVAILABLE">RD_KAFKA_TIMESTAMP_NOT_AVAILABLE</a>) |
|
<span class="comment">// TimestampCreateTime indicates timestamp set by producer (source time)</span> |
|
<span id="TimestampCreateTime">TimestampCreateTime</span> = <a href="#TimestampType">TimestampType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_TIMESTAMP_CREATE_TIME">RD_KAFKA_TIMESTAMP_CREATE_TIME</a>) |
|
<span class="comment">// TimestampLogAppendTime indicates timestamp set set by broker (store time)</span> |
|
<span id="TimestampLogAppendTime">TimestampLogAppendTime</span> = <a href="#TimestampType">TimestampType</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME">RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME</a>) |
|
)</pre> |
|
<pre>const ( |
|
<span class="comment">// PurgeInFlight purges messages in-flight to or from the broker.</span> |
|
<span class="comment">// Purging these messages will void any future acknowledgements from the</span> |
|
<span class="comment">// broker, making it impossible for the application to know if these</span> |
|
<span class="comment">// messages were successfully delivered or not.</span> |
|
<span class="comment">// Retrying these messages may lead to duplicates.</span> |
|
<span id="PurgeInFlight">PurgeInFlight</span> = <a href="https://pkg.go.dev/builtin/#int">int</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_PURGE_F_INFLIGHT">RD_KAFKA_PURGE_F_INFLIGHT</a>) |
|
|
|
<span class="comment">// PurgeQueue Purge messages in internal queues.</span> |
|
<span id="PurgeQueue">PurgeQueue</span> = <a href="https://pkg.go.dev/builtin/#int">int</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_PURGE_F_QUEUE">RD_KAFKA_PURGE_F_QUEUE</a>) |
|
|
|
<span class="comment">// PurgeNonBlocking Don't wait for background thread queue purging to finish.</span> |
|
<span id="PurgeNonBlocking">PurgeNonBlocking</span> = <a href="https://pkg.go.dev/builtin/#int">int</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_PURGE_F_NON_BLOCKING">RD_KAFKA_PURGE_F_NON_BLOCKING</a>) |
|
)</pre> |
|
<pre>const ( |
|
<span class="comment">// AlterOperationSet sets/overwrites the configuration setting.</span> |
|
<span id="AlterOperationSet">AlterOperationSet</span> = <a href="https://pkg.go.dev/builtin/#iota">iota</a> |
|
)</pre> |
|
<p> |
|
LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client |
|
</p> |
|
<pre>const <span id="LibrdkafkaLinkInfo">LibrdkafkaLinkInfo</span> = "static glibc_linux from librdkafka-static-bundle-v1.9.2.tgz"</pre> |
|
<p> |
|
OffsetBeginning represents the earliest offset (logical) |
|
</p> |
|
<pre>const <span id="OffsetBeginning">OffsetBeginning</span> = <a href="#Offset">Offset</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_OFFSET_BEGINNING">RD_KAFKA_OFFSET_BEGINNING</a>)</pre> |
|
<p> |
|
OffsetEnd represents the latest offset (logical) |
|
</p> |
|
<pre>const <span id="OffsetEnd">OffsetEnd</span> = <a href="#Offset">Offset</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_OFFSET_END">RD_KAFKA_OFFSET_END</a>)</pre> |
|
<p> |
|
OffsetInvalid represents an invalid/unspecified offset |
|
</p> |
|
<pre>const <span id="OffsetInvalid">OffsetInvalid</span> = <a href="#Offset">Offset</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_OFFSET_INVALID">RD_KAFKA_OFFSET_INVALID</a>)</pre> |
|
<p> |
|
OffsetStored represents a stored offset |
|
</p> |
|
<pre>const <span id="OffsetStored">OffsetStored</span> = <a href="#Offset">Offset</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_OFFSET_STORED">RD_KAFKA_OFFSET_STORED</a>)</pre> |
|
<p> |
|
PartitionAny represents any partition (for partitioning), |
|
or unspecified value (for all other cases) |
|
</p> |
|
<pre>const <span id="PartitionAny">PartitionAny</span> = <a href="https://pkg.go.dev/builtin/#int32">int32</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_PARTITION_UA">RD_KAFKA_PARTITION_UA</a>)</pre> |
|
<h2 id="LibraryVersion"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go?s=15368:15403#L361"> |
|
LibraryVersion |
|
</a> |
|
<a class="permalink" href="#LibraryVersion"> |
|
¶ |
|
</a> |
|
</h2> |
|
<pre>func LibraryVersion() (<a href="https://pkg.go.dev/builtin/#int">int</a>, <a href="https://pkg.go.dev/builtin/#string">string</a>)</pre> |
|
<p> |
|
LibraryVersion returns the underlying librdkafka library version as a |
|
(version_int, version_str) tuple. |
|
</p> |
|
<h2 id="WriteErrorCodes"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error_gen.go?s=1501:1533#L49"> |
|
WriteErrorCodes |
|
</a> |
|
<a class="permalink" href="#WriteErrorCodes"> |
|
¶ |
|
</a> |
|
</h2> |
|
<pre>func WriteErrorCodes(f *<a href="https://pkg.go.dev/os/">os</a>.<a href="https://pkg.go.dev/os/#File">File</a>)</pre> |
|
<p> |
|
WriteErrorCodes writes Go error code constants to file from the |
|
librdkafka error codes. |
|
This function is not intended for public use. |
|
</p> |
|
<h2 id="ACLBinding"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=17697:18355#L471"> |
|
ACLBinding |
|
</a> |
|
<a class="permalink" href="#ACLBinding"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ACLBinding specifies the operation and permission type for a specific principal |
|
over one or more resources of the same type. Used by `AdminClient.CreateACLs`, |
|
returned by `AdminClient.DescribeACLs` and `AdminClient.DeleteACLs`. |
|
</p> |
|
<pre>type ACLBinding struct { |
|
<span id="ACLBinding.Type"></span> Type <a href="#ResourceType">ResourceType</a> <span class="comment">// The resource type.</span> |
|
<span class="comment">// The resource name, which depends on the resource type.</span> |
|
<span class="comment">// For ResourceBroker the resource name is the broker id.</span> |
|
<span id="ACLBinding.Name"></span> Name <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="ACLBinding.ResourcePatternType"></span> ResourcePatternType <a href="#ResourcePatternType">ResourcePatternType</a> <span class="comment">// The resource pattern, relative to the name.</span> |
|
<span id="ACLBinding.Principal"></span> Principal <a href="https://pkg.go.dev/builtin/#string">string</a> <span class="comment">// The principal this ACLBinding refers to.</span> |
|
<span id="ACLBinding.Host"></span> Host <a href="https://pkg.go.dev/builtin/#string">string</a> <span class="comment">// The host that the call is allowed to come from.</span> |
|
<span id="ACLBinding.Operation"></span> Operation <a href="#ACLOperation">ACLOperation</a> <span class="comment">// The operation/s specified by this binding.</span> |
|
<span id="ACLBinding.PermissionType"></span> PermissionType <a href="#ACLPermissionType">ACLPermissionType</a> <span class="comment">// The permission type for the specified operation.</span> |
|
} |
|
</pre> |
|
<h2 id="ACLBindingFilter"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=18542:18576#L485"> |
|
ACLBindingFilter |
|
</a> |
|
<a class="permalink" href="#ACLBindingFilter"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ACLBindingFilter specifies a filter used to return a list of ACL bindings matching some or all of its attributes. |
|
Used by `AdminClient.DescribeACLs` and `AdminClient.DeleteACLs`. |
|
</p> |
|
<pre>type ACLBindingFilter = <a href="#ACLBinding">ACLBinding</a></pre> |
|
<h2 id="ACLBindingFilters"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=18787:18828#L493"> |
|
ACLBindingFilters |
|
</a> |
|
<a class="permalink" href="#ACLBindingFilters"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ACLBindingFilters is a slice of ACLBindingFilter that also implements |
|
the sort interface |
|
</p> |
|
<pre>type ACLBindingFilters []<a href="#ACLBindingFilter">ACLBindingFilter</a></pre> |
|
<h2 id="ACLBindings"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=18661:18690#L489"> |
|
ACLBindings |
|
</a> |
|
<a class="permalink" href="#ACLBindings"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ACLBindings is a slice of ACLBinding that also implements |
|
the sort interface |
|
</p> |
|
<pre>type ACLBindings []<a href="#ACLBinding">ACLBinding</a></pre> |
|
<h3 id="ACLBindings.Len"> |
|
func (ACLBindings) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=18830:18860#L495"> |
|
Len |
|
</a> |
|
<a class="permalink" href="#ACLBindings.Len"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a <a href="#ACLBindings">ACLBindings</a>) Len() <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="ACLBindings.Less"> |
|
func (ACLBindings) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=18881:18921#L499"> |
|
Less |
|
</a> |
|
<a class="permalink" href="#ACLBindings.Less"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a <a href="#ACLBindings">ACLBindings</a>) Less(i, j <a href="https://pkg.go.dev/builtin/#int">int</a>) <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre> |
|
<h3 id="ACLBindings.Swap"> |
|
func (ACLBindings) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=19521:19556#L524"> |
|
Swap |
|
</a> |
|
<a class="permalink" href="#ACLBindings.Swap"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a <a href="#ACLBindings">ACLBindings</a>) Swap(i, j <a href="https://pkg.go.dev/builtin/#int">int</a>)</pre> |
|
<h2 id="ACLOperation"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=13203:13224#L365"> |
|
ACLOperation |
|
</a> |
|
<a class="permalink" href="#ACLOperation"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ACLOperation enumerates the different types of ACL operation. |
|
</p> |
|
<pre>type ACLOperation <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="ACLOperationFromString"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=15209:15285#L403"> |
|
ACLOperationFromString |
|
</a> |
|
<a class="permalink" href="#ACLOperationFromString"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func ACLOperationFromString(aclOperationString <a href="https://pkg.go.dev/builtin/#string">string</a>) (<a href="#ACLOperation">ACLOperation</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
ACLOperationFromString translates a ACL operation name to |
|
a ACLOperation value. |
|
</p> |
|
<h3 id="ACLOperation.String"> |
|
func (ACLOperation) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=15001:15038#L397"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ACLOperation.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (o <a href="#ACLOperation">ACLOperation</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns the human-readable representation of an ACLOperation |
|
</p> |
|
<h2 id="ACLPermissionType"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=16151:16177#L435"> |
|
ACLPermissionType |
|
</a> |
|
<a class="permalink" href="#ACLPermissionType"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ACLPermissionType enumerates the different types of ACL permission types. |
|
</p> |
|
<pre>type ACLPermissionType <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="ACLPermissionTypeFromString"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=17052:17143#L455"> |
|
ACLPermissionTypeFromString |
|
</a> |
|
<a class="permalink" href="#ACLPermissionTypeFromString"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func ACLPermissionTypeFromString(aclPermissionTypeString <a href="https://pkg.go.dev/builtin/#string">string</a>) (<a href="#ACLPermissionType">ACLPermissionType</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
ACLPermissionTypeFromString translates a ACL permission type name to |
|
a ACLPermissionType value. |
|
</p> |
|
<h3 id="ACLPermissionType.String"> |
|
func (ACLPermissionType) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=16813:16855#L449"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ACLPermissionType.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (o <a href="#ACLPermissionType">ACLPermissionType</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns the human-readable representation of an ACLPermissionType |
|
</p> |
|
<h2 id="AdminClient"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=2047:2148#L66"> |
|
AdminClient |
|
</a> |
|
<a class="permalink" href="#AdminClient"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AdminClient is derived from an existing Producer or Consumer |
|
</p> |
|
<pre>type AdminClient struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="NewAdminClient"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=55075:55133#L1546"> |
|
NewAdminClient |
|
</a> |
|
<a class="permalink" href="#NewAdminClient"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewAdminClient(conf *<a href="#ConfigMap">ConfigMap</a>) (*<a href="#AdminClient">AdminClient</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewAdminClient creats a new AdminClient instance with a new underlying client instance |
|
</p> |
|
<h3 id="NewAdminClientFromConsumer"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=56598:56670#L1595"> |
|
NewAdminClientFromConsumer |
|
</a> |
|
<a class="permalink" href="#NewAdminClientFromConsumer"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewAdminClientFromConsumer(c *<a href="#Consumer">Consumer</a>) (a *<a href="#AdminClient">AdminClient</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewAdminClientFromConsumer derives a new AdminClient from an existing Consumer instance. |
|
The AdminClient will use the same configuration and connections as the parent instance. |
|
</p> |
|
<h3 id="NewAdminClientFromProducer"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=56134:56206#L1582"> |
|
NewAdminClientFromProducer |
|
</a> |
|
<a class="permalink" href="#NewAdminClientFromProducer"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewAdminClientFromProducer(p *<a href="#Producer">Producer</a>) (a *<a href="#AdminClient">AdminClient</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewAdminClientFromProducer derives a new AdminClient from an existing Producer instance. |
|
The AdminClient will use the same configuration and connections as the parent instance. |
|
</p> |
|
<h3 id="AdminClient.AlterConfigs"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=34443:34605#L983"> |
|
AlterConfigs |
|
</a> |
|
<a class="permalink" href="#AdminClient.AlterConfigs"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) AlterConfigs(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, resources []<a href="#ConfigResource">ConfigResource</a>, options ...<a href="#AlterConfigsAdminOption">AlterConfigsAdminOption</a>) (result []<a href="#ConfigResourceResult">ConfigResourceResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
AlterConfigs alters/updates cluster resource configuration. |
|
</p> |
|
<p> |
|
Updates are not transactional so they may succeed for a subset |
|
of the provided resources while others fail. |
|
The configuration for a particular resource is updated atomically, |
|
replacing values using the provided ConfigEntrys and reverting |
|
unspecified ConfigEntrys to their default values. |
|
</p> |
|
<p> |
|
Requires broker version >=0.11.0.0 |
|
</p> |
|
<p> |
|
AlterConfigs will replace all existing configuration for |
|
the provided resources with the new configuration given, |
|
reverting all other configuration to their default values. |
|
</p> |
|
<p> |
|
Multiple resources and resource types may be set, but at most one |
|
resource of type ResourceBroker is allowed per call since these |
|
resource requests must be sent to the broker specified in the resource. |
|
</p> |
|
<h3 id="AdminClient.Close"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=54799:54828#L1533"> |
|
Close |
|
</a> |
|
<a class="permalink" href="#AdminClient.Close"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) Close()</pre> |
|
<p> |
|
Close an AdminClient instance. |
|
</p> |
|
<h3 id="AdminClient.ClusterID"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=23890:23972#L660"> |
|
ClusterID |
|
</a> |
|
<a class="permalink" href="#AdminClient.ClusterID"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) ClusterID(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>) (clusterID <a href="https://pkg.go.dev/builtin/#string">string</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
ClusterID returns the cluster ID as reported in broker metadata. |
|
</p> |
|
<p> |
|
Note on cancellation: Although the underlying C function respects the |
|
timeout, it currently cannot be manually cancelled. That means manually |
|
cancelling the context will block until the C function call returns. |
|
</p> |
|
<p> |
|
Requires broker version >= 0.10.0. |
|
</p> |
|
<h3 id="AdminClient.ControllerID"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=24882:24969#L692"> |
|
ControllerID |
|
</a> |
|
<a class="permalink" href="#AdminClient.ControllerID"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) ControllerID(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>) (controllerID <a href="https://pkg.go.dev/builtin/#int32">int32</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
ControllerID returns the broker ID of the current controller as reported in |
|
broker metadata. |
|
</p> |
|
<p> |
|
Note on cancellation: Although the underlying C function respects the |
|
timeout, it currently cannot be manually cancelled. That means manually |
|
cancelling the context will block until the C function call returns. |
|
</p> |
|
<p> |
|
Requires broker version >= 0.10.0. |
|
</p> |
|
<h3 id="AdminClient.CreateACLs"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=47740:47890#L1342"> |
|
CreateACLs |
|
</a> |
|
<a class="permalink" href="#AdminClient.CreateACLs"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) CreateACLs(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, aclBindings <a href="#ACLBindings">ACLBindings</a>, options ...<a href="#CreateACLsAdminOption">CreateACLsAdminOption</a>) (result []<a href="#CreateACLResult">CreateACLResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
CreateACLs creates one or more ACL bindings. |
|
</p> |
|
<p> |
|
Parameters: |
|
</p> |
|
<pre>* `ctx` - context with the maximum amount of time to block, or nil for indefinite. |
|
* `aclBindings` - A slice of ACL binding specifications to create. |
|
* `options` - Create ACLs options |
|
</pre> |
|
<p> |
|
Returns a slice of CreateACLResult with a ErrNoError ErrorCode when the operation was successful |
|
plus an error that is not nil for client level errors |
|
</p> |
|
<h3 id="AdminClient.CreatePartitions"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=31223:31394#L893"> |
|
CreatePartitions |
|
</a> |
|
<a class="permalink" href="#AdminClient.CreatePartitions"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) CreatePartitions(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, partitions []<a href="#PartitionsSpecification">PartitionsSpecification</a>, options ...<a href="#CreatePartitionsAdminOption">CreatePartitionsAdminOption</a>) (result []<a href="#TopicResult">TopicResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
CreatePartitions creates additional partitions for topics. |
|
</p> |
|
<h3 id="AdminClient.CreateTopics"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=25712:25866#L721"> |
|
CreateTopics |
|
</a> |
|
<a class="permalink" href="#AdminClient.CreateTopics"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) CreateTopics(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, topics []<a href="#TopicSpecification">TopicSpecification</a>, options ...<a href="#CreateTopicsAdminOption">CreateTopicsAdminOption</a>) (result []<a href="#TopicResult">TopicResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
CreateTopics creates topics in cluster. |
|
</p> |
|
<p> |
|
The list of TopicSpecification objects define the per-topic partition count, replicas, etc. |
|
</p> |
|
<p> |
|
Topic creation is non-atomic and may succeed for some topics but fail for others, |
|
make sure to check the result for topic-specific errors. |
|
</p> |
|
<p> |
|
Note: TopicSpecification is analogous to NewTopic in the Java Topic Admin API. |
|
</p> |
|
<h3 id="AdminClient.DeleteACLs"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=52785:52948#L1473"> |
|
DeleteACLs |
|
</a> |
|
<a class="permalink" href="#AdminClient.DeleteACLs"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) DeleteACLs(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, aclBindingFilters <a href="#ACLBindingFilters">ACLBindingFilters</a>, options ...<a href="#DeleteACLsAdminOption">DeleteACLsAdminOption</a>) (result []<a href="#DeleteACLsResult">DeleteACLsResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
DeleteACLs deletes ACL bindings matching one or more ACL binding filters. |
|
</p> |
|
<p> |
|
Parameters: |
|
</p> |
|
<pre>* `ctx` - context with the maximum amount of time to block, or nil for indefinite. |
|
* `aclBindingFilters` - a slice of ACL binding filters to match ACLs to delete. |
|
string attributes match exact values or any string if set to empty string. |
|
Enum attributes match exact values or any value if ending with `Any`. |
|
If `ResourcePatternType` is set to `ResourcePatternTypeMatch` deletes ACL bindings with: |
|
- `ResourcePatternTypeLiteral` pattern type with resource name equal to the given resource name |
|
- `ResourcePatternTypeLiteral` pattern type with wildcard resource name that matches the given resource name |
|
- `ResourcePatternTypePrefixed` pattern type with resource name that is a prefix of the given resource name |
|
* `options` - Delete ACLs options |
|
</pre> |
|
<p> |
|
Returns a slice of ACLBinding for each filter when the operation was successful |
|
plus an error that is not `nil` for client level errors |
|
</p> |
|
<h3 id="AdminClient.DeleteTopics"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=29450:29592#L835"> |
|
DeleteTopics |
|
</a> |
|
<a class="permalink" href="#AdminClient.DeleteTopics"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) DeleteTopics(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, topics []<a href="https://pkg.go.dev/builtin/#string">string</a>, options ...<a href="#DeleteTopicsAdminOption">DeleteTopicsAdminOption</a>) (result []<a href="#TopicResult">TopicResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
DeleteTopics deletes a batch of topics. |
|
</p> |
|
<p> |
|
This operation is not transactional and may succeed for a subset of topics while |
|
failing others. |
|
It may take several seconds after the DeleteTopics result returns success for |
|
all the brokers to become aware that the topics are gone. During this time, |
|
topic metadata and configuration may continue to return information about deleted topics. |
|
</p> |
|
<p> |
|
Requires broker version >= 0.10.1.0 |
|
</p> |
|
<h3 id="AdminClient.DescribeACLs"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=50547:50713#L1417"> |
|
DescribeACLs |
|
</a> |
|
<a class="permalink" href="#AdminClient.DescribeACLs"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) DescribeACLs(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, aclBindingFilter <a href="#ACLBindingFilter">ACLBindingFilter</a>, options ...<a href="#DescribeACLsAdminOption">DescribeACLsAdminOption</a>) (result *<a href="#DescribeACLsResult">DescribeACLsResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
DescribeACLs matches ACL bindings by filter. |
|
</p> |
|
<p> |
|
Parameters: |
|
</p> |
|
<pre>* `ctx` - context with the maximum amount of time to block, or nil for indefinite. |
|
* `aclBindingFilter` - A filter with attributes that must match. |
|
string attributes match exact values or any string if set to empty string. |
|
Enum attributes match exact values or any value if ending with `Any`. |
|
If `ResourcePatternType` is set to `ResourcePatternTypeMatch` returns ACL bindings with: |
|
- `ResourcePatternTypeLiteral` pattern type with resource name equal to the given resource name |
|
- `ResourcePatternTypeLiteral` pattern type with wildcard resource name that matches the given resource name |
|
- `ResourcePatternTypePrefixed` pattern type with resource name that is a prefix of the given resource name |
|
* `options` - Describe ACLs options |
|
</pre> |
|
<p> |
|
Returns a slice of ACLBindings when the operation was successful |
|
plus an error that is not `nil` for client level errors |
|
</p> |
|
<h3 id="AdminClient.DescribeConfigs"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=37645:37813#L1081"> |
|
DescribeConfigs |
|
</a> |
|
<a class="permalink" href="#AdminClient.DescribeConfigs"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) DescribeConfigs(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, resources []<a href="#ConfigResource">ConfigResource</a>, options ...<a href="#DescribeConfigsAdminOption">DescribeConfigsAdminOption</a>) (result []<a href="#ConfigResourceResult">ConfigResourceResult</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
DescribeConfigs retrieves configuration for cluster resources. |
|
</p> |
|
<p> |
|
The returned configuration includes default values, use |
|
ConfigEntryResult.IsDefault or ConfigEntryResult.Source to distinguish |
|
default values from manually configured settings. |
|
</p> |
|
<p> |
|
The value of config entries where .IsSensitive is true |
|
will always be nil to avoid disclosing sensitive |
|
information, such as security settings. |
|
</p> |
|
<p> |
|
Configuration entries where .IsReadOnly is true can't be modified |
|
(with AlterConfigs). |
|
</p> |
|
<p> |
|
Synonym configuration entries are returned if the broker supports |
|
it (broker version >= 1.1.0). See .Synonyms. |
|
</p> |
|
<p> |
|
Requires broker version >=0.11.0.0 |
|
</p> |
|
<p> |
|
Multiple resources and resource types may be requested, but at most |
|
one resource of type ResourceBroker is allowed per call |
|
since these resource requests must be sent to the broker specified |
|
in the resource. |
|
</p> |
|
<h3 id="AdminClient.GetMetadata"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=39826:39924#L1144"> |
|
GetMetadata |
|
</a> |
|
<a class="permalink" href="#AdminClient.GetMetadata"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) GetMetadata(topic *<a href="https://pkg.go.dev/builtin/#string">string</a>, allTopics <a href="https://pkg.go.dev/builtin/#bool">bool</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (*<a href="#Metadata">Metadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
GetMetadata queries broker for cluster and topic metadata. |
|
If topic is non-nil only information about that topic is returned, else if |
|
allTopics is false only information about locally used topics is returned, |
|
else information about all topics is returned. |
|
GetMetadata is equivalent to listTopics, describeTopics and describeCluster in the Java API. |
|
</p> |
|
<h3 id="AdminClient.SetOAuthBearerToken"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=40850:40932#L1168"> |
|
SetOAuthBearerToken |
|
</a> |
|
<a class="permalink" href="#AdminClient.SetOAuthBearerToken"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) SetOAuthBearerToken(oauthBearerToken <a href="#OAuthBearerToken">OAuthBearerToken</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SetOAuthBearerToken sets the the data to be transmitted |
|
to a broker during SASL/OAUTHBEARER authentication. It will return nil |
|
on success, otherwise an error if: |
|
1) the token data is invalid (meaning an expiration time in the past |
|
or either a token value or an extension key or value that does not meet |
|
the regular expression requirements as per |
|
<a href="https://tools.ietf.org/html/rfc7628#section-3.1"> |
|
https://tools.ietf.org/html/rfc7628#section-3.1 |
|
</a> |
|
); |
|
2) SASL/OAUTHBEARER is not supported by the underlying librdkafka build; |
|
3) SASL/OAUTHBEARER is supported but is not configured as the client's |
|
authentication mechanism. |
|
</p> |
|
<h3 id="AdminClient.SetOAuthBearerTokenFailure"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=41431:41500#L1179"> |
|
SetOAuthBearerTokenFailure |
|
</a> |
|
<a class="permalink" href="#AdminClient.SetOAuthBearerTokenFailure"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) SetOAuthBearerTokenFailure(errstr <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SetOAuthBearerTokenFailure sets the error message describing why token |
|
retrieval/setting failed; it also schedules a new token refresh event for 10 |
|
seconds later so the attempt may be retried. It will return nil on |
|
success, otherwise an error if: |
|
1) SASL/OAUTHBEARER is not supported by the underlying librdkafka build; |
|
2) SASL/OAUTHBEARER is supported but is not configured as the client's |
|
authentication mechanism. |
|
</p> |
|
<h3 id="AdminClient.String"> |
|
func (*AdminClient) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=40050:40087#L1149"> |
|
String |
|
</a> |
|
<a class="permalink" href="#AdminClient.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (a *<a href="#AdminClient">AdminClient</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human readable name for an AdminClient instance |
|
</p> |
|
<h2 id="AdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=7543:7623#L269"> |
|
AdminOption |
|
</a> |
|
<a class="permalink" href="#AdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AdminOption is a generic type not to be used directly. |
|
</p> |
|
<p> |
|
See CreateTopicsAdminOption et.al. |
|
</p> |
|
<pre>type AdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="AdminOptionOperationTimeout"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=1227:1303#L33"> |
|
AdminOptionOperationTimeout |
|
</a> |
|
<a class="permalink" href="#AdminOptionOperationTimeout"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AdminOptionOperationTimeout sets the broker's operation timeout, such as the |
|
timeout for CreateTopics to complete the creation of topics on the controller |
|
before returning a result to the application. |
|
</p> |
|
<p> |
|
CreateTopics, DeleteTopics, CreatePartitions: |
|
a value 0 will return immediately after triggering topic |
|
creation, while > 0 will wait this long for topic creation to propagate |
|
in cluster. |
|
</p> |
|
<p> |
|
Default: 0 (return immediately). |
|
</p> |
|
<p> |
|
Valid for CreateTopics, DeleteTopics, CreatePartitions. |
|
</p> |
|
<pre>type AdminOptionOperationTimeout struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="SetAdminOperationTimeout"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=2574:2653#L79"> |
|
SetAdminOperationTimeout |
|
</a> |
|
<a class="permalink" href="#SetAdminOperationTimeout"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func SetAdminOperationTimeout(t <a href="https://pkg.go.dev/time/">time</a>.<a href="https://pkg.go.dev/time/#Duration">Duration</a>) (ao <a href="#AdminOptionOperationTimeout">AdminOptionOperationTimeout</a>)</pre> |
|
<p> |
|
SetAdminOperationTimeout sets the broker's operation timeout, such as the |
|
timeout for CreateTopics to complete the creation of topics on the controller |
|
before returning a result to the application. |
|
</p> |
|
<p> |
|
CreateTopics, DeleteTopics, CreatePartitions: |
|
a value 0 will return immediately after triggering topic |
|
creation, while > 0 will wait this long for topic creation to propagate |
|
in cluster. |
|
</p> |
|
<p> |
|
Default: 0 (return immediately). |
|
</p> |
|
<p> |
|
Valid for CreateTopics, DeleteTopics, CreatePartitions. |
|
</p> |
|
<h2 id="AdminOptionRequestTimeout"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=2927:3001#L91"> |
|
AdminOptionRequestTimeout |
|
</a> |
|
<a class="permalink" href="#AdminOptionRequestTimeout"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AdminOptionRequestTimeout sets the overall request timeout, including broker |
|
lookup, request transmission, operation time on broker, and response. |
|
</p> |
|
<p> |
|
Default: `socket.timeout.ms`. |
|
</p> |
|
<p> |
|
Valid for all Admin API methods. |
|
</p> |
|
<pre>type AdminOptionRequestTimeout struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="SetAdminRequestTimeout"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=4073:4148#L135"> |
|
SetAdminRequestTimeout |
|
</a> |
|
<a class="permalink" href="#SetAdminRequestTimeout"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func SetAdminRequestTimeout(t <a href="https://pkg.go.dev/time/">time</a>.<a href="https://pkg.go.dev/time/#Duration">Duration</a>) (ao <a href="#AdminOptionRequestTimeout">AdminOptionRequestTimeout</a>)</pre> |
|
<p> |
|
SetAdminRequestTimeout sets the overall request timeout, including broker |
|
lookup, request transmission, operation time on broker, and response. |
|
</p> |
|
<p> |
|
Default: `socket.timeout.ms`. |
|
</p> |
|
<p> |
|
Valid for all Admin API methods. |
|
</p> |
|
<h2 id="AdminOptionValidateOnly"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=4419:4482#L147"> |
|
AdminOptionValidateOnly |
|
</a> |
|
<a class="permalink" href="#AdminOptionValidateOnly"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AdminOptionValidateOnly tells the broker to only validate the request, |
|
without performing the requested operation (create topics, etc). |
|
</p> |
|
<p> |
|
Default: false. |
|
</p> |
|
<p> |
|
Valid for CreateTopics, CreatePartitions, AlterConfigs |
|
</p> |
|
<pre>type AdminOptionValidateOnly struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="SetAdminValidateOnly"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=5594:5667#L196"> |
|
SetAdminValidateOnly |
|
</a> |
|
<a class="permalink" href="#SetAdminValidateOnly"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func SetAdminValidateOnly(validateOnly <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (ao <a href="#AdminOptionValidateOnly">AdminOptionValidateOnly</a>)</pre> |
|
<p> |
|
SetAdminValidateOnly tells the broker to only validate the request, |
|
without performing the requested operation (create topics, etc). |
|
</p> |
|
<p> |
|
Default: false. |
|
</p> |
|
<p> |
|
Valid for CreateTopics, DeleteTopics, CreatePartitions, AlterConfigs |
|
</p> |
|
<h2 id="AlterConfigsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=6559:6675#L229"> |
|
AlterConfigsAdminOption |
|
</a> |
|
<a class="permalink" href="#AlterConfigsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AlterConfigsAdminOption - see setters. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout, SetAdminValidateOnly, SetAdminIncremental. |
|
</p> |
|
<pre>type AlterConfigsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="AlterOperation"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=7492:7515#L209"> |
|
AlterOperation |
|
</a> |
|
<a class="permalink" href="#AlterOperation"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AlterOperation specifies the operation to perform on the ConfigEntry. |
|
Currently only AlterOperationSet. |
|
</p> |
|
<pre>type AlterOperation <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="AlterOperation.String"> |
|
func (AlterOperation) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=7692:7731#L217"> |
|
String |
|
</a> |
|
<a class="permalink" href="#AlterOperation.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (o <a href="#AlterOperation">AlterOperation</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns the human-readable representation of an AlterOperation |
|
</p> |
|
<h2 id="AssignedPartitions"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=2554:2617#L91"> |
|
AssignedPartitions |
|
</a> |
|
<a class="permalink" href="#AssignedPartitions"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
AssignedPartitions consumer group rebalance event: assigned partition set |
|
</p> |
|
<pre>type AssignedPartitions struct { |
|
<span id="AssignedPartitions.Partitions"></span> Partitions []<a href="#TopicPartition">TopicPartition</a> |
|
} |
|
</pre> |
|
<h3 id="AssignedPartitions.String"> |
|
func (AssignedPartitions) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=2619:2662#L95"> |
|
String |
|
</a> |
|
<a class="permalink" href="#AssignedPartitions.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#AssignedPartitions">AssignedPartitions</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="BrokerMetadata"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/metadata.go?s=1262:1327#L37"> |
|
BrokerMetadata |
|
</a> |
|
<a class="permalink" href="#BrokerMetadata"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
BrokerMetadata contains per-broker metadata |
|
</p> |
|
<pre>type BrokerMetadata struct { |
|
<span id="BrokerMetadata.ID"></span> ID <a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
<span id="BrokerMetadata.Host"></span> Host <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="BrokerMetadata.Port"></span> Port <a href="https://pkg.go.dev/builtin/#int">int</a> |
|
} |
|
</pre> |
|
<h2 id="ConfigEntry"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=7918:8145#L227"> |
|
ConfigEntry |
|
</a> |
|
<a class="permalink" href="#ConfigEntry"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConfigEntry holds parameters for altering a resource's configuration. |
|
</p> |
|
<pre>type ConfigEntry struct { |
|
<span id="ConfigEntry.Name"></span> <span class="comment">// Name of configuration entry, e.g., topic configuration property name.</span> |
|
Name <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="ConfigEntry.Value"></span> <span class="comment">// Value of configuration entry.</span> |
|
Value <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="ConfigEntry.Operation"></span> <span class="comment">// Operation to perform on the entry.</span> |
|
Operation <a href="#AlterOperation">AlterOperation</a> |
|
} |
|
</pre> |
|
<h3 id="StringMapToConfigEntries"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=8298:8396#L238"> |
|
StringMapToConfigEntries |
|
</a> |
|
<a class="permalink" href="#StringMapToConfigEntries"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func StringMapToConfigEntries(stringMap map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="https://pkg.go.dev/builtin/#string">string</a>, operation <a href="#AlterOperation">AlterOperation</a>) []<a href="#ConfigEntry">ConfigEntry</a></pre> |
|
<p> |
|
StringMapToConfigEntries creates a new map of ConfigEntry objects from the |
|
provided string map. The AlterOperation is set on each created entry. |
|
</p> |
|
<h3 id="ConfigEntry.String"> |
|
func (ConfigEntry) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=8627:8663#L249"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ConfigEntry.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c <a href="#ConfigEntry">ConfigEntry</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human-readable representation of a ConfigEntry. |
|
</p> |
|
<h2 id="ConfigEntryResult"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=8843:9576#L255"> |
|
ConfigEntryResult |
|
</a> |
|
<a class="permalink" href="#ConfigEntryResult"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConfigEntryResult contains the result of a single configuration entry from a |
|
DescribeConfigs request. |
|
</p> |
|
<pre>type ConfigEntryResult struct { |
|
<span id="ConfigEntryResult.Name"></span> <span class="comment">// Name of configuration entry, e.g., topic configuration property name.</span> |
|
Name <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="ConfigEntryResult.Value"></span> <span class="comment">// Value of configuration entry.</span> |
|
Value <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="ConfigEntryResult.Source"></span> <span class="comment">// Source indicates the configuration source.</span> |
|
Source <a href="#ConfigSource">ConfigSource</a> |
|
<span id="ConfigEntryResult.IsReadOnly"></span> <span class="comment">// IsReadOnly indicates whether the configuration entry can be altered.</span> |
|
IsReadOnly <a href="https://pkg.go.dev/builtin/#bool">bool</a> |
|
<span id="ConfigEntryResult.IsSensitive"></span> <span class="comment">// IsSensitive indicates whether the configuration entry contains sensitive information, in which case the value will be unset.</span> |
|
IsSensitive <a href="https://pkg.go.dev/builtin/#bool">bool</a> |
|
<span id="ConfigEntryResult.IsSynonym"></span> <span class="comment">// IsSynonym indicates whether the configuration entry is a synonym for another configuration property.</span> |
|
IsSynonym <a href="https://pkg.go.dev/builtin/#bool">bool</a> |
|
<span id="ConfigEntryResult.Synonyms"></span> <span class="comment">// Synonyms contains a map of configuration entries that are synonyms to this configuration entry.</span> |
|
Synonyms map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="#ConfigEntryResult">ConfigEntryResult</a> |
|
} |
|
</pre> |
|
<h3 id="ConfigEntryResult.String"> |
|
func (ConfigEntryResult) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=9652:9694#L273"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ConfigEntryResult.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c <a href="#ConfigEntryResult">ConfigEntryResult</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human-readable representation of a ConfigEntryResult. |
|
</p> |
|
<h2 id="ConfigMap"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/config.go?s=1394:1431#L36"> |
|
ConfigMap |
|
</a> |
|
<a class="permalink" href="#ConfigMap"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConfigMap is a map containing standard librdkafka configuration properties as documented in: |
|
<a href="https://github.com/edenhill/librdkafka/tree/master/CONFIGURATION.md"> |
|
https://github.com/edenhill/librdkafka/tree/master/CONFIGURATION.md |
|
</a> |
|
</p> |
|
<p> |
|
The special property "default.topic.config" (optional) is a ConfigMap |
|
containing default topic configuration properties. |
|
</p> |
|
<p> |
|
The use of "default.topic.config" is deprecated, |
|
topic configuration properties shall be specified in the standard ConfigMap. |
|
For backwards compatibility, "default.topic.config" (if supplied) |
|
takes precedence. |
|
</p> |
|
<pre>type ConfigMap map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="#ConfigValue">ConfigValue</a></pre> |
|
<h3 id="ConfigMap.Get"> |
|
func (ConfigMap) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/config.go?s=7594:7669#L268"> |
|
Get |
|
</a> |
|
<a class="permalink" href="#ConfigMap.Get"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (m <a href="#ConfigMap">ConfigMap</a>) Get(key <a href="https://pkg.go.dev/builtin/#string">string</a>, defval <a href="#ConfigValue">ConfigValue</a>) (<a href="#ConfigValue">ConfigValue</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Get finds the given key in the ConfigMap and returns its value. |
|
If the key is not found `defval` is returned. |
|
If the key is found but the type does not match that of `defval` (unless nil) |
|
an ErrInvalidArg error is returned. |
|
</p> |
|
<h3 id="ConfigMap.Set"> |
|
func (ConfigMap) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/config.go?s=2062:2101#L58"> |
|
Set |
|
</a> |
|
<a class="permalink" href="#ConfigMap.Set"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (m <a href="#ConfigMap">ConfigMap</a>) Set(kv <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
Set implements flag.Set (command line argument parser) as a convenience |
|
for `-X key=value` config. |
|
</p> |
|
<h3 id="ConfigMap.SetKey"> |
|
func (ConfigMap) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/config.go?s=1619:1681#L42"> |
|
SetKey |
|
</a> |
|
<a class="permalink" href="#ConfigMap.SetKey"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (m <a href="#ConfigMap">ConfigMap</a>) SetKey(key <a href="https://pkg.go.dev/builtin/#string">string</a>, value <a href="#ConfigValue">ConfigValue</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SetKey sets configuration property key to value. |
|
</p> |
|
<p> |
|
For user convenience a key prefixed with {topic}. will be |
|
set on the "default.topic.config" sub-map, this use is deprecated. |
|
</p> |
|
<h2 id="ConfigResource"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=6814:7209#L190"> |
|
ConfigResource |
|
</a> |
|
<a class="permalink" href="#ConfigResource"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConfigResource holds parameters for altering an Apache Kafka configuration resource |
|
</p> |
|
<pre>type ConfigResource struct { |
|
<span id="ConfigResource.Type"></span> <span class="comment">// Type of resource to set.</span> |
|
Type <a href="#ResourceType">ResourceType</a> |
|
<span id="ConfigResource.Name"></span> <span class="comment">// Name of resource to set.</span> |
|
Name <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="ConfigResource.Config"></span> <span class="comment">// Config entries to set.</span> |
|
<span class="comment">// Configuration updates are atomic, any configuration property not provided</span> |
|
<span class="comment">// here will be reverted (by the broker) to its default value.</span> |
|
<span class="comment">// Use DescribeConfigs to retrieve the list of current configuration entry values.</span> |
|
Config []<a href="#ConfigEntry">ConfigEntry</a> |
|
} |
|
</pre> |
|
<h3 id="ConfigResource.String"> |
|
func (ConfigResource) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=7281:7320#L203"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ConfigResource.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c <a href="#ConfigResource">ConfigResource</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human-readable representation of a ConfigResource |
|
</p> |
|
<h2 id="ConfigResourceResult"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=10822:11121#L306"> |
|
ConfigResourceResult |
|
</a> |
|
<a class="permalink" href="#ConfigResourceResult"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConfigResourceResult provides the result for a resource from a AlterConfigs or |
|
DescribeConfigs request. |
|
</p> |
|
<pre>type ConfigResourceResult struct { |
|
<span id="ConfigResourceResult.Type"></span> <span class="comment">// Type of returned result resource.</span> |
|
Type <a href="#ResourceType">ResourceType</a> |
|
<span id="ConfigResourceResult.Name"></span> <span class="comment">// Name of returned result resource.</span> |
|
Name <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="ConfigResourceResult.Error"></span> <span class="comment">// Error, if any, of returned result resource.</span> |
|
Error <a href="#Error">Error</a> |
|
<span id="ConfigResourceResult.Config"></span> <span class="comment">// Config entries, if any, of returned result resource.</span> |
|
Config map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="#ConfigEntryResult">ConfigEntryResult</a> |
|
} |
|
</pre> |
|
<h3 id="ConfigResourceResult.String"> |
|
func (ConfigResourceResult) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=11200:11245#L318"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ConfigResourceResult.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c <a href="#ConfigResourceResult">ConfigResourceResult</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human-readable representation of a ConfigResourceResult. |
|
</p> |
|
<h2 id="ConfigSource"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=5389:5410#L167"> |
|
ConfigSource |
|
</a> |
|
<a class="permalink" href="#ConfigSource"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConfigSource represents an Apache Kafka config source |
|
</p> |
|
<pre>type ConfigSource <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="ConfigSource.String"> |
|
func (ConfigSource) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=6605:6642#L185"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ConfigSource.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (t <a href="#ConfigSource">ConfigSource</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns the human-readable representation of a ConfigSource type |
|
</p> |
|
<h2 id="ConfigValue"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/config.go?s=842:870#L24"> |
|
ConfigValue |
|
</a> |
|
<a class="permalink" href="#ConfigValue"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConfigValue supports the following types: |
|
</p> |
|
<pre>bool, int, string, any type with the standard String() interface |
|
</pre> |
|
<pre>type ConfigValue interface{}</pre> |
|
<h2 id="Consumer"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=1184:1431#L32"> |
|
Consumer |
|
</a> |
|
<a class="permalink" href="#Consumer"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Consumer implements a High-level Apache Kafka Consumer instance |
|
</p> |
|
<pre>type Consumer struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="NewConsumer"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=15102:15154#L454"> |
|
NewConsumer |
|
</a> |
|
<a class="permalink" href="#NewConsumer"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewConsumer(conf *<a href="#ConfigMap">ConfigMap</a>) (*<a href="#Consumer">Consumer</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewConsumer creates a new high-level Consumer instance. |
|
</p> |
|
<p> |
|
conf is a *ConfigMap with standard librdkafka configuration properties. |
|
</p> |
|
<p> |
|
Supported special configuration properties: |
|
</p> |
|
<pre>go.application.rebalance.enable (bool, false) - Forward rebalancing responsibility to application via the Events() channel. |
|
If set to true the app must handle the AssignedPartitions and |
|
RevokedPartitions events and call Assign() and Unassign() |
|
respectively. |
|
go.events.channel.enable (bool, false) - [deprecated] Enable the Events() channel. Messages and events will be pushed on the Events() channel and the Poll() interface will be disabled. |
|
go.events.channel.size (int, 1000) - Events() channel size |
|
go.logs.channel.enable (bool, false) - Forward log to Logs() channel. |
|
go.logs.channel (chan kafka.LogEvent, nil) - Forward logs to application-provided channel instead of Logs(). Requires go.logs.channel.enable=true. |
|
</pre> |
|
<p> |
|
WARNING: Due to the buffering nature of channels (and queues in general) the |
|
use of the events channel risks receiving outdated events and |
|
messages. Minimizing go.events.channel.size reduces the risk |
|
and number of outdated events and messages but does not eliminate |
|
the factor completely. With a channel size of 1 at most one |
|
event or message may be outdated. |
|
</p> |
|
<h3 id="Consumer.Assign"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=3153:3219#L95"> |
|
Assign |
|
</a> |
|
<a class="permalink" href="#Consumer.Assign"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Assign(partitions []<a href="#TopicPartition">TopicPartition</a>) (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Assign an atomic set of partitions to consume. |
|
</p> |
|
<p> |
|
The .Offset field of each TopicPartition must either be set to an absolute |
|
starting offset (>= 0), or one of the logical offsets (`kafka.OffsetEnd` etc), |
|
but should typically be set to `kafka.OffsetStored` to have the consumer |
|
use the committed offset as a start position, with a fallback to |
|
`auto.offset.reset` if there is no committed offset. |
|
</p> |
|
<p> |
|
This replaces the current assignment. |
|
</p> |
|
<h3 id="Consumer.Assignment"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=20687:20759#L621"> |
|
Assignment |
|
</a> |
|
<a class="permalink" href="#Consumer.Assignment"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Assignment() (partitions []<a href="#TopicPartition">TopicPartition</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Assignment returns the current partition assignments |
|
</p> |
|
<h3 id="Consumer.AssignmentLost"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=5986:6026#L184"> |
|
AssignmentLost |
|
</a> |
|
<a class="permalink" href="#Consumer.AssignmentLost"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) AssignmentLost() <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre> |
|
<p> |
|
AssignmentLost returns true if current partition assignment has been lost. |
|
This method is only applicable for use with a subscribing consumer when |
|
handling a rebalance event or callback. |
|
Partitions that have been lost may already be owned by other members in the |
|
group and therefore commiting offsets, for example, may fail. |
|
</p> |
|
<h3 id="Consumer.Close"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=13151:13189#L408"> |
|
Close |
|
</a> |
|
<a class="permalink" href="#Consumer.Close"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Close() (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Close Consumer instance. |
|
The object is no longer usable after this call. |
|
</p> |
|
<h3 id="Consumer.Commit"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=7731:7784#L239"> |
|
Commit |
|
</a> |
|
<a class="permalink" href="#Consumer.Commit"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Commit() ([]<a href="#TopicPartition">TopicPartition</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Commit offsets for currently assigned partitions |
|
This is a blocking call. |
|
Returns the committed offsets on success. |
|
</p> |
|
<h3 id="Consumer.CommitMessage"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=7948:8018#L246"> |
|
CommitMessage |
|
</a> |
|
<a class="permalink" href="#Consumer.CommitMessage"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) CommitMessage(m *<a href="#Message">Message</a>) ([]<a href="#TopicPartition">TopicPartition</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
CommitMessage commits offset based on the provided message. |
|
This is a blocking call. |
|
Returns the committed offsets on success. |
|
</p> |
|
<h3 id="Consumer.CommitOffsets"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=8364:8448#L258"> |
|
CommitOffsets |
|
</a> |
|
<a class="permalink" href="#Consumer.CommitOffsets"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) CommitOffsets(offsets []<a href="#TopicPartition">TopicPartition</a>) ([]<a href="#TopicPartition">TopicPartition</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
CommitOffsets commits the provided list of offsets |
|
This is a blocking call. |
|
Returns the committed offsets on success. |
|
</p> |
|
<h3 id="Consumer.Committed"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=21146:21256#L636"> |
|
Committed |
|
</a> |
|
<a class="permalink" href="#Consumer.Committed"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Committed(partitions []<a href="#TopicPartition">TopicPartition</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (offsets []<a href="#TopicPartition">TopicPartition</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Committed retrieves committed offsets for the given set of partitions |
|
</p> |
|
<h3 id="Consumer.Events"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=11343:11381#L339"> |
|
Events |
|
</a> |
|
<a class="permalink" href="#Consumer.Events"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Events() chan <a href="#Event">Event</a></pre> |
|
<p> |
|
Events returns the Events channel (if enabled) |
|
</p> |
|
<h3 id="Consumer.GetConsumerGroupMetadata"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=26041:26118#L756"> |
|
GetConsumerGroupMetadata |
|
</a> |
|
<a class="permalink" href="#Consumer.GetConsumerGroupMetadata"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) GetConsumerGroupMetadata() (*<a href="#ConsumerGroupMetadata">ConsumerGroupMetadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
GetConsumerGroupMetadata returns the consumer's current group metadata. |
|
This object should be passed to the transactional producer's |
|
SendOffsetsToTransaction() API. |
|
</p> |
|
<h3 id="Consumer.GetMetadata"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=18189:18284#L563"> |
|
GetMetadata |
|
</a> |
|
<a class="permalink" href="#Consumer.GetMetadata"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) GetMetadata(topic *<a href="https://pkg.go.dev/builtin/#string">string</a>, allTopics <a href="https://pkg.go.dev/builtin/#bool">bool</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (*<a href="#Metadata">Metadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
GetMetadata queries broker for cluster and topic metadata. |
|
If topic is non-nil only information about that topic is returned, else if |
|
allTopics is false only information about locally used topics is returned, |
|
else information about all topics is returned. |
|
GetMetadata is equivalent to listTopics, describeTopics and describeCluster in the Java API. |
|
</p> |
|
<h3 id="Consumer.GetRebalanceProtocol"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=5481:5529#L170"> |
|
GetRebalanceProtocol |
|
</a> |
|
<a class="permalink" href="#Consumer.GetRebalanceProtocol"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) GetRebalanceProtocol() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
GetRebalanceProtocol returns the current consumer group rebalance protocol, |
|
which is either "EAGER" or "COOPERATIVE". |
|
If the rebalance protocol is not known in the current state an empty string |
|
is returned. |
|
Should typically only be called during rebalancing. |
|
</p> |
|
<h3 id="Consumer.GetWatermarkOffsets"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=18989:19087#L576"> |
|
GetWatermarkOffsets |
|
</a> |
|
<a class="permalink" href="#Consumer.GetWatermarkOffsets"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) GetWatermarkOffsets(topic <a href="https://pkg.go.dev/builtin/#string">string</a>, partition <a href="https://pkg.go.dev/builtin/#int32">int32</a>) (low, high <a href="https://pkg.go.dev/builtin/#int64">int64</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
GetWatermarkOffsets returns the cached low and high offsets for the given topic |
|
and partition. The high offset is populated on every fetch response or via calling QueryWatermarkOffsets. |
|
The low offset is populated every statistics.interval.ms if that value is set. |
|
OffsetInvalid will be returned if there is no cached offset for either value. |
|
</p> |
|
<h3 id="Consumer.IncrementalAssign"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=4256:4333#L131"> |
|
IncrementalAssign |
|
</a> |
|
<a class="permalink" href="#Consumer.IncrementalAssign"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) IncrementalAssign(partitions []<a href="#TopicPartition">TopicPartition</a>) (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
IncrementalAssign adds the specified partitions to the current set of |
|
partitions to consume. |
|
</p> |
|
<p> |
|
The .Offset field of each TopicPartition must either be set to an absolute |
|
starting offset (>= 0), or one of the logical offsets (`kafka.OffsetEnd` etc), |
|
but should typically be set to `kafka.OffsetStored` to have the consumer |
|
use the committed offset as a start position, with a fallback to |
|
`auto.offset.reset` if there is no committed offset. |
|
</p> |
|
<p> |
|
The new partitions must not be part of the current assignment. |
|
</p> |
|
<h3 id="Consumer.IncrementalUnassign"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=4846:4925#L151"> |
|
IncrementalUnassign |
|
</a> |
|
<a class="permalink" href="#Consumer.IncrementalUnassign"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) IncrementalUnassign(partitions []<a href="#TopicPartition">TopicPartition</a>) (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
IncrementalUnassign removes the specified partitions from the current set of |
|
partitions to consume. |
|
</p> |
|
<p> |
|
The .Offset field of the TopicPartition is ignored. |
|
</p> |
|
<p> |
|
The removed partitions must be part of the current assignment. |
|
</p> |
|
<h3 id="Consumer.Logs"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=11466:11505#L344"> |
|
Logs |
|
</a> |
|
<a class="permalink" href="#Consumer.Logs"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Logs() chan <a href="#LogEvent">LogEvent</a></pre> |
|
<p> |
|
Logs returns the log channel if enabled, or nil otherwise. |
|
</p> |
|
<h3 id="Consumer.OffsetsForTimes"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=19856:19967#L595"> |
|
OffsetsForTimes |
|
</a> |
|
<a class="permalink" href="#Consumer.OffsetsForTimes"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) OffsetsForTimes(times []<a href="#TopicPartition">TopicPartition</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (offsets []<a href="#TopicPartition">TopicPartition</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
OffsetsForTimes looks up offsets by timestamp for the given partitions. |
|
</p> |
|
<p> |
|
The returned offset for each partition is the earliest offset whose |
|
timestamp is greater than or equal to the given timestamp in the |
|
corresponding partition. If the provided timestamp exceeds that of the |
|
last message in the partition, a value of -1 will be returned. |
|
</p> |
|
<p> |
|
The timestamps to query are represented as `.Offset` in the `times` |
|
argument and the looked up offsets are represented as `.Offset` in the returned |
|
`offsets` list. |
|
</p> |
|
<p> |
|
The function will block for at most timeoutMs milliseconds. |
|
</p> |
|
<p> |
|
Duplicate Topic+Partitions are not supported. |
|
Per-partition errors may be returned in the `.Error` field. |
|
</p> |
|
<h3 id="Consumer.Pause"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=22595:22660#L669"> |
|
Pause |
|
</a> |
|
<a class="permalink" href="#Consumer.Pause"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Pause(partitions []<a href="#TopicPartition">TopicPartition</a>) (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Pause consumption for the provided list of partitions |
|
</p> |
|
<p> |
|
Note that messages already enqueued on the consumer's Event channel |
|
(if `go.events.channel.enable` has been set) will NOT be purged by |
|
this call, set `go.events.channel.size` accordingly. |
|
</p> |
|
<h3 id="Consumer.Poll"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=11171:11223#L333"> |
|
Poll |
|
</a> |
|
<a class="permalink" href="#Consumer.Poll"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Poll(timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (event <a href="#Event">Event</a>)</pre> |
|
<p> |
|
Poll the consumer for messages or events. |
|
</p> |
|
<h3 id="hdr-Will_block_for_at_most_timeoutMs_milliseconds"> |
|
Will block for at most timeoutMs milliseconds |
|
</h3> |
|
<p> |
|
The following callbacks may be triggered: |
|
</p> |
|
<pre>Subscribe()'s rebalanceCb |
|
</pre> |
|
<p> |
|
Returns nil on timeout, else an Event |
|
</p> |
|
<h3 id="Consumer.Position"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=21955:22049#L653"> |
|
Position |
|
</a> |
|
<a class="permalink" href="#Consumer.Position"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Position(partitions []<a href="#TopicPartition">TopicPartition</a>) (offsets []<a href="#TopicPartition">TopicPartition</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Position returns the current consume position for the given partitions. |
|
Typical use is to call Assignment() to get the partition list |
|
and then pass it to Position() to get the current consume position for |
|
each of the assigned partitions. |
|
The consume position is the next message to read from the partition. |
|
i.e., the offset of the last message seen by the application + 1. |
|
</p> |
|
<h3 id="Consumer.QueryWatermarkOffsets"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=18450:18565#L568"> |
|
QueryWatermarkOffsets |
|
</a> |
|
<a class="permalink" href="#Consumer.QueryWatermarkOffsets"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) QueryWatermarkOffsets(topic <a href="https://pkg.go.dev/builtin/#string">string</a>, partition <a href="https://pkg.go.dev/builtin/#int32">int32</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (low, high <a href="https://pkg.go.dev/builtin/#int64">int64</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
QueryWatermarkOffsets queries the broker for the low and high offsets for the given topic and partition. |
|
</p> |
|
<h3 id="Consumer.ReadMessage"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=12314:12385#L366"> |
|
ReadMessage |
|
</a> |
|
<a class="permalink" href="#Consumer.ReadMessage"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) ReadMessage(timeout <a href="https://pkg.go.dev/time/">time</a>.<a href="https://pkg.go.dev/time/#Duration">Duration</a>) (*<a href="#Message">Message</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
ReadMessage polls the consumer for a message. |
|
</p> |
|
<p> |
|
This is a convenience API that wraps Poll() and only returns |
|
messages or errors. All other event types are discarded. |
|
</p> |
|
<p> |
|
The call will block for at most `timeout` waiting for |
|
a new message or error. `timeout` may be set to -1 for |
|
indefinite wait. |
|
</p> |
|
<p> |
|
Timeout is returned as (nil, err) where err is `err.(kafka.Error).Code() == kafka.ErrTimedOut`. |
|
</p> |
|
<p> |
|
Messages are returned as (msg, nil), |
|
while general errors are returned as (nil, err), |
|
and partition-specific errors are returned as (msg, err) where |
|
msg.TopicPartition provides partition-specific information (such as topic, partition and offset). |
|
</p> |
|
<p> |
|
All other event types, such as PartitionEOF, AssignedPartitions, etc, are silently discarded. |
|
</p> |
|
<h3 id="Consumer.Resume"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=22971:23037#L680"> |
|
Resume |
|
</a> |
|
<a class="permalink" href="#Consumer.Resume"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Resume(partitions []<a href="#TopicPartition">TopicPartition</a>) (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Resume consumption for the provided list of partitions |
|
</p> |
|
<h3 id="Consumer.Seek"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=10636:10706#L313"> |
|
Seek |
|
</a> |
|
<a class="permalink" href="#Consumer.Seek"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Seek(partition <a href="#TopicPartition">TopicPartition</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
Seek seeks the given topic partitions using the offset from the TopicPartition. |
|
</p> |
|
<p> |
|
If timeoutMs is not 0 the call will wait this long for the |
|
seek to be performed. If the timeout is reached the internal state |
|
will be unknown and this function returns ErrTimedOut. |
|
If timeoutMs is 0 it will initiate the seek but return |
|
immediately without any error reporting (e.g., async). |
|
</p> |
|
<p> |
|
Seek() may only be used for partitions already being consumed |
|
(through Assign() or implicitly through a self-rebalanced Subscribe()). |
|
To set the starting offset it is preferred to use Assign() and provide |
|
a starting offset for each partition. |
|
</p> |
|
<p> |
|
Returns an error on failure or nil otherwise. |
|
</p> |
|
<h3 id="Consumer.SetOAuthBearerToken"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=23887:23966#L700"> |
|
SetOAuthBearerToken |
|
</a> |
|
<a class="permalink" href="#Consumer.SetOAuthBearerToken"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) SetOAuthBearerToken(oauthBearerToken <a href="#OAuthBearerToken">OAuthBearerToken</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SetOAuthBearerToken sets the the data to be transmitted |
|
to a broker during SASL/OAUTHBEARER authentication. It will return nil |
|
on success, otherwise an error if: |
|
1) the token data is invalid (meaning an expiration time in the past |
|
or either a token value or an extension key or value that does not meet |
|
the regular expression requirements as per |
|
<a href="https://tools.ietf.org/html/rfc7628#section-3.1"> |
|
https://tools.ietf.org/html/rfc7628#section-3.1 |
|
</a> |
|
); |
|
2) SASL/OAUTHBEARER is not supported by the underlying librdkafka build; |
|
3) SASL/OAUTHBEARER is supported but is not configured as the client's |
|
authentication mechanism. |
|
</p> |
|
<h3 id="Consumer.SetOAuthBearerTokenFailure"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=24465:24531#L711"> |
|
SetOAuthBearerTokenFailure |
|
</a> |
|
<a class="permalink" href="#Consumer.SetOAuthBearerTokenFailure"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) SetOAuthBearerTokenFailure(errstr <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SetOAuthBearerTokenFailure sets the error message describing why token |
|
retrieval/setting failed; it also schedules a new token refresh event for 10 |
|
seconds later so the attempt may be retried. It will return nil on |
|
success, otherwise an error if: |
|
1) SASL/OAUTHBEARER is not supported by the underlying librdkafka build; |
|
2) SASL/OAUTHBEARER is supported but is not configured as the client's |
|
authentication mechanism. |
|
</p> |
|
<h3 id="Consumer.StoreMessage"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=9491:9578#L287"> |
|
StoreMessage |
|
</a> |
|
<a class="permalink" href="#Consumer.StoreMessage"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) StoreMessage(m *<a href="#Message">Message</a>) (storedOffsets []<a href="#TopicPartition">TopicPartition</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
StoreMessage stores offset based on the provided message. |
|
This is a convenience method that uses StoreOffsets to do the actual work. |
|
</p> |
|
<h3 id="Consumer.StoreOffsets"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=8862:8963#L269"> |
|
StoreOffsets |
|
</a> |
|
<a class="permalink" href="#Consumer.StoreOffsets"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) StoreOffsets(offsets []<a href="#TopicPartition">TopicPartition</a>) (storedOffsets []<a href="#TopicPartition">TopicPartition</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
StoreOffsets stores the provided list of offsets that will be committed |
|
to the offset store according to `auto.commit.interval.ms` or manual |
|
offset-less Commit(). |
|
</p> |
|
<p> |
|
Returns the stored offsets on success. If at least one offset couldn't be stored, |
|
an error and a list of offsets is returned. Each offset can be checked for |
|
specific errors via its `.Error` member. |
|
</p> |
|
<h3 id="Consumer.String"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=1498:1532#L43"> |
|
String |
|
</a> |
|
<a class="permalink" href="#Consumer.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
Strings returns a human readable name for a Consumer instance |
|
</p> |
|
<h3 id="Consumer.Subscribe"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=1744:1817#L54"> |
|
Subscribe |
|
</a> |
|
<a class="permalink" href="#Consumer.Subscribe"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Subscribe(topic <a href="https://pkg.go.dev/builtin/#string">string</a>, rebalanceCb <a href="#RebalanceCb">RebalanceCb</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
Subscribe to a single topic |
|
This replaces the current subscription |
|
</p> |
|
<h3 id="Consumer.SubscribeTopics"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=1984:2072#L60"> |
|
SubscribeTopics |
|
</a> |
|
<a class="permalink" href="#Consumer.SubscribeTopics"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) SubscribeTopics(topics []<a href="https://pkg.go.dev/builtin/#string">string</a>, rebalanceCb <a href="#RebalanceCb">RebalanceCb</a>) (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
SubscribeTopics subscribes to the provided list of topics. |
|
This replaces the current subscription. |
|
</p> |
|
<h3 id="Consumer.Subscription"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=20089:20151#L600"> |
|
Subscription |
|
</a> |
|
<a class="permalink" href="#Consumer.Subscription"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Subscription() (topics []<a href="https://pkg.go.dev/builtin/#string">string</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Subscription returns the current subscription as set by Subscribe() |
|
</p> |
|
<h3 id="Consumer.Unassign"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=3534:3575#L110"> |
|
Unassign |
|
</a> |
|
<a class="permalink" href="#Consumer.Unassign"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Unassign() (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Unassign the current set of partitions to consume. |
|
</p> |
|
<h3 id="Consumer.Unsubscribe"> |
|
func (*Consumer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=2597:2641#L81"> |
|
Unsubscribe |
|
</a> |
|
<a class="permalink" href="#Consumer.Unsubscribe"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c *<a href="#Consumer">Consumer</a>) Unsubscribe() (err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
Unsubscribe from the current subscription, if any. |
|
</p> |
|
<h2 id="ConsumerGroupMetadata"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=24667:24723#L716"> |
|
ConsumerGroupMetadata |
|
</a> |
|
<a class="permalink" href="#ConsumerGroupMetadata"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ConsumerGroupMetadata reflects the current consumer group member metadata. |
|
</p> |
|
<pre>type ConsumerGroupMetadata struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="NewTestConsumerGroupMetadata"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=26655:26736#L774"> |
|
NewTestConsumerGroupMetadata |
|
</a> |
|
<a class="permalink" href="#NewTestConsumerGroupMetadata"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewTestConsumerGroupMetadata(groupID <a href="https://pkg.go.dev/builtin/#string">string</a>) (*<a href="#ConsumerGroupMetadata">ConsumerGroupMetadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewTestConsumerGroupMetadata creates a new consumer group metadata instance |
|
mainly for testing use. |
|
Use GetConsumerGroupMetadata() to retrieve the real metadata. |
|
</p> |
|
<h2 id="CreateACLResult"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=19645:19760#L529"> |
|
CreateACLResult |
|
</a> |
|
<a class="permalink" href="#CreateACLResult"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
CreateACLResult provides create ACL error information. |
|
</p> |
|
<pre>type CreateACLResult struct { |
|
<span id="CreateACLResult.Error"></span> <span class="comment">// Error, if any, of result. Check with `Error.Code() != ErrNoError`.</span> |
|
Error <a href="#Error">Error</a> |
|
} |
|
</pre> |
|
<h2 id="CreateACLsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=6952:7064#L245"> |
|
CreateACLsAdminOption |
|
</a> |
|
<a class="permalink" href="#CreateACLsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
CreateACLsAdminOption - see setter. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout |
|
</p> |
|
<pre>type CreateACLsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="CreatePartitionsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=6314:6438#L221"> |
|
CreatePartitionsAdminOption |
|
</a> |
|
<a class="permalink" href="#CreatePartitionsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
CreatePartitionsAdminOption - see setters. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout, SetAdminOperationTimeout, SetAdminValidateOnly. |
|
</p> |
|
<pre>type CreatePartitionsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="CreateTopicsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=5848:5964#L205"> |
|
CreateTopicsAdminOption |
|
</a> |
|
<a class="permalink" href="#CreateTopicsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
CreateTopicsAdminOption - see setters. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout, SetAdminOperationTimeout, SetAdminValidateOnly. |
|
</p> |
|
<pre>type CreateTopicsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="DeleteACLsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=7330:7442#L261"> |
|
DeleteACLsAdminOption |
|
</a> |
|
<a class="permalink" href="#DeleteACLsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
DeleteACLsAdminOption - see setter. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout |
|
</p> |
|
<pre>type DeleteACLsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="DeleteACLsResult"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=20106:20148#L543"> |
|
DeleteACLsResult |
|
</a> |
|
<a class="permalink" href="#DeleteACLsResult"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
DeleteACLsResult provides delete ACLs result or error information. |
|
</p> |
|
<pre>type DeleteACLsResult = <a href="#DescribeACLsResult">DescribeACLsResult</a></pre> |
|
<h2 id="DeleteTopicsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=6068:6184#L213"> |
|
DeleteTopicsAdminOption |
|
</a> |
|
<a class="permalink" href="#DeleteTopicsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
DeleteTopicsAdminOption - see setters. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout, SetAdminOperationTimeout. |
|
</p> |
|
<pre>type DeleteTopicsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="DescribeACLsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=7140:7256#L253"> |
|
DescribeACLsAdminOption |
|
</a> |
|
<a class="permalink" href="#DescribeACLsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
DescribeACLsAdminOption - see setter. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout |
|
</p> |
|
<pre>type DescribeACLsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="DescribeACLsResult"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=19836:20034#L535"> |
|
DescribeACLsResult |
|
</a> |
|
<a class="permalink" href="#DescribeACLsResult"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
DescribeACLsResult provides describe ACLs result or error information. |
|
</p> |
|
<pre>type DescribeACLsResult struct { |
|
<span class="comment">// Slice of ACL bindings matching the provided filter</span> |
|
<span id="DescribeACLsResult.ACLBindings"></span> ACLBindings <a href="#ACLBindings">ACLBindings</a> |
|
<span id="DescribeACLsResult.Error"></span> <span class="comment">// Error, if any, of result. Check with `Error.Code() != ErrNoError`.</span> |
|
Error <a href="#Error">Error</a> |
|
} |
|
</pre> |
|
<h2 id="DescribeConfigsAdminOption"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminoptions.go?s=6756:6878#L237"> |
|
DescribeConfigsAdminOption |
|
</a> |
|
<a class="permalink" href="#DescribeConfigsAdminOption"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
DescribeConfigsAdminOption - see setters. |
|
</p> |
|
<p> |
|
See SetAdminRequestTimeout. |
|
</p> |
|
<pre>type DescribeConfigsAdminOption interface { |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="Error"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=907:1050#L25"> |
|
Error |
|
</a> |
|
<a class="permalink" href="#Error"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Error provides a Kafka-specific error container |
|
</p> |
|
<pre>type Error struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="NewError"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=1181:1246#L38"> |
|
NewError |
|
</a> |
|
<a class="permalink" href="#NewError"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewError(code <a href="#ErrorCode">ErrorCode</a>, str <a href="https://pkg.go.dev/builtin/#string">string</a>, fatal <a href="https://pkg.go.dev/builtin/#bool">bool</a>) (err <a href="#Error">Error</a>)</pre> |
|
<p> |
|
NewError creates a new Error. |
|
</p> |
|
<h3 id="Error.Code"> |
|
func (Error) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=2925:2956#L101"> |
|
Code |
|
</a> |
|
<a class="permalink" href="#Error.Code"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#Error">Error</a>) Code() <a href="#ErrorCode">ErrorCode</a></pre> |
|
<p> |
|
Code returns the ErrorCode of an Error |
|
</p> |
|
<h3 id="Error.Error"> |
|
func (Error) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=2548:2577#L80"> |
|
Error |
|
</a> |
|
<a class="permalink" href="#Error.Error"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#Error">Error</a>) Error() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
Error returns a human readable representation of an Error |
|
Same as Error.String() |
|
</p> |
|
<h3 id="Error.IsFatal"> |
|
func (Error) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=3200:3229#L109"> |
|
IsFatal |
|
</a> |
|
<a class="permalink" href="#Error.IsFatal"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#Error">Error</a>) IsFatal() <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre> |
|
<p> |
|
IsFatal returns true if the error is a fatal error. |
|
A fatal error indicates the client instance is no longer operable and |
|
should be terminated. Typical causes include non-recoverable |
|
idempotent producer errors. |
|
</p> |
|
<h3 id="Error.IsRetriable"> |
|
func (Error) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=3408:3441#L116"> |
|
IsRetriable |
|
</a> |
|
<a class="permalink" href="#Error.IsRetriable"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#Error">Error</a>) IsRetriable() <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre> |
|
<p> |
|
IsRetriable returns true if the operation that caused this error |
|
may be retried. |
|
This flag is currently only set by the Transactional producer API. |
|
</p> |
|
<h3 id="Error.String"> |
|
func (Error) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=2664:2694#L85"> |
|
String |
|
</a> |
|
<a class="permalink" href="#Error.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#Error">Error</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human readable representation of an Error |
|
</p> |
|
<h3 id="Error.TxnRequiresAbort"> |
|
func (Error) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/error.go?s=3810:3848#L125"> |
|
TxnRequiresAbort |
|
</a> |
|
<a class="permalink" href="#Error.TxnRequiresAbort"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#Error">Error</a>) TxnRequiresAbort() <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre> |
|
<p> |
|
TxnRequiresAbort returns true if the error is an abortable transaction error |
|
that requires the application to abort the current transaction with |
|
AbortTransaction() and start a new transaction with BeginTransaction() |
|
if it wishes to proceed with transactional operations. |
|
This flag is only set by the Transactional producer API. |
|
</p> |
|
<h2 id="ErrorCode"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/generated_errors.go?s=283:301#L1"> |
|
ErrorCode |
|
</a> |
|
<a class="permalink" href="#ErrorCode"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ErrorCode is the integer representation of local and broker error codes |
|
</p> |
|
<pre>type ErrorCode <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<pre>const ( |
|
<span class="comment">// ErrBadMsg Local: Bad message format</span> |
|
<span id="ErrBadMsg">ErrBadMsg</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__BAD_MSG">RD_KAFKA_RESP_ERR__BAD_MSG</a>) |
|
<span class="comment">// ErrBadCompression Local: Invalid compressed data</span> |
|
<span id="ErrBadCompression">ErrBadCompression</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__BAD_COMPRESSION">RD_KAFKA_RESP_ERR__BAD_COMPRESSION</a>) |
|
<span class="comment">// ErrDestroy Local: Broker handle destroyed</span> |
|
<span id="ErrDestroy">ErrDestroy</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__DESTROY">RD_KAFKA_RESP_ERR__DESTROY</a>) |
|
<span class="comment">// ErrFail Local: Communication failure with broker</span> |
|
<span id="ErrFail">ErrFail</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__FAIL">RD_KAFKA_RESP_ERR__FAIL</a>) |
|
<span class="comment">// ErrTransport Local: Broker transport failure</span> |
|
<span id="ErrTransport">ErrTransport</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__TRANSPORT">RD_KAFKA_RESP_ERR__TRANSPORT</a>) |
|
<span class="comment">// ErrCritSysResource Local: Critical system resource failure</span> |
|
<span id="ErrCritSysResource">ErrCritSysResource</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE">RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE</a>) |
|
<span class="comment">// ErrResolve Local: Host resolution failure</span> |
|
<span id="ErrResolve">ErrResolve</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__RESOLVE">RD_KAFKA_RESP_ERR__RESOLVE</a>) |
|
<span class="comment">// ErrMsgTimedOut Local: Message timed out</span> |
|
<span id="ErrMsgTimedOut">ErrMsgTimedOut</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__MSG_TIMED_OUT">RD_KAFKA_RESP_ERR__MSG_TIMED_OUT</a>) |
|
<span class="comment">// ErrPartitionEOF Broker: No more messages</span> |
|
<span id="ErrPartitionEOF">ErrPartitionEOF</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__PARTITION_EOF">RD_KAFKA_RESP_ERR__PARTITION_EOF</a>) |
|
<span class="comment">// ErrUnknownPartition Local: Unknown partition</span> |
|
<span id="ErrUnknownPartition">ErrUnknownPartition</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION">RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION</a>) |
|
<span class="comment">// ErrFs Local: File or filesystem error</span> |
|
<span id="ErrFs">ErrFs</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__FS">RD_KAFKA_RESP_ERR__FS</a>) |
|
<span class="comment">// ErrUnknownTopic Local: Unknown topic</span> |
|
<span id="ErrUnknownTopic">ErrUnknownTopic</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC">RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC</a>) |
|
<span class="comment">// ErrAllBrokersDown Local: All broker connections are down</span> |
|
<span id="ErrAllBrokersDown">ErrAllBrokersDown</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN">RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN</a>) |
|
<span class="comment">// ErrInvalidArg Local: Invalid argument or configuration</span> |
|
<span id="ErrInvalidArg">ErrInvalidArg</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__INVALID_ARG">RD_KAFKA_RESP_ERR__INVALID_ARG</a>) |
|
<span class="comment">// ErrTimedOut Local: Timed out</span> |
|
<span id="ErrTimedOut">ErrTimedOut</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__TIMED_OUT">RD_KAFKA_RESP_ERR__TIMED_OUT</a>) |
|
<span class="comment">// ErrQueueFull Local: Queue full</span> |
|
<span id="ErrQueueFull">ErrQueueFull</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__QUEUE_FULL">RD_KAFKA_RESP_ERR__QUEUE_FULL</a>) |
|
<span class="comment">// ErrIsrInsuff Local: ISR count insufficient</span> |
|
<span id="ErrIsrInsuff">ErrIsrInsuff</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__ISR_INSUFF">RD_KAFKA_RESP_ERR__ISR_INSUFF</a>) |
|
<span class="comment">// ErrNodeUpdate Local: Broker node update</span> |
|
<span id="ErrNodeUpdate">ErrNodeUpdate</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__NODE_UPDATE">RD_KAFKA_RESP_ERR__NODE_UPDATE</a>) |
|
<span class="comment">// ErrSsl Local: SSL error</span> |
|
<span id="ErrSsl">ErrSsl</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__SSL">RD_KAFKA_RESP_ERR__SSL</a>) |
|
<span class="comment">// ErrWaitCoord Local: Waiting for coordinator</span> |
|
<span id="ErrWaitCoord">ErrWaitCoord</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__WAIT_COORD">RD_KAFKA_RESP_ERR__WAIT_COORD</a>) |
|
<span class="comment">// ErrUnknownGroup Local: Unknown group</span> |
|
<span id="ErrUnknownGroup">ErrUnknownGroup</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__UNKNOWN_GROUP">RD_KAFKA_RESP_ERR__UNKNOWN_GROUP</a>) |
|
<span class="comment">// ErrInProgress Local: Operation in progress</span> |
|
<span id="ErrInProgress">ErrInProgress</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__IN_PROGRESS">RD_KAFKA_RESP_ERR__IN_PROGRESS</a>) |
|
<span class="comment">// ErrPrevInProgress Local: Previous operation in progress</span> |
|
<span id="ErrPrevInProgress">ErrPrevInProgress</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS">RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS</a>) |
|
<span class="comment">// ErrExistingSubscription Local: Existing subscription</span> |
|
<span id="ErrExistingSubscription">ErrExistingSubscription</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION">RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION</a>) |
|
<span class="comment">// ErrAssignPartitions Local: Assign partitions</span> |
|
<span id="ErrAssignPartitions">ErrAssignPartitions</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS">RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS</a>) |
|
<span class="comment">// ErrRevokePartitions Local: Revoke partitions</span> |
|
<span id="ErrRevokePartitions">ErrRevokePartitions</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS">RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS</a>) |
|
<span class="comment">// ErrConflict Local: Conflicting use</span> |
|
<span id="ErrConflict">ErrConflict</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__CONFLICT">RD_KAFKA_RESP_ERR__CONFLICT</a>) |
|
<span class="comment">// ErrState Local: Erroneous state</span> |
|
<span id="ErrState">ErrState</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__STATE">RD_KAFKA_RESP_ERR__STATE</a>) |
|
<span class="comment">// ErrUnknownProtocol Local: Unknown protocol</span> |
|
<span id="ErrUnknownProtocol">ErrUnknownProtocol</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL">RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL</a>) |
|
<span class="comment">// ErrNotImplemented Local: Not implemented</span> |
|
<span id="ErrNotImplemented">ErrNotImplemented</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED">RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED</a>) |
|
<span class="comment">// ErrAuthentication Local: Authentication failure</span> |
|
<span id="ErrAuthentication">ErrAuthentication</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__AUTHENTICATION">RD_KAFKA_RESP_ERR__AUTHENTICATION</a>) |
|
<span class="comment">// ErrNoOffset Local: No offset stored</span> |
|
<span id="ErrNoOffset">ErrNoOffset</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__NO_OFFSET">RD_KAFKA_RESP_ERR__NO_OFFSET</a>) |
|
<span class="comment">// ErrOutdated Local: Outdated</span> |
|
<span id="ErrOutdated">ErrOutdated</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__OUTDATED">RD_KAFKA_RESP_ERR__OUTDATED</a>) |
|
<span class="comment">// ErrTimedOutQueue Local: Timed out in queue</span> |
|
<span id="ErrTimedOutQueue">ErrTimedOutQueue</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE">RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE</a>) |
|
<span class="comment">// ErrUnsupportedFeature Local: Required feature not supported by broker</span> |
|
<span id="ErrUnsupportedFeature">ErrUnsupportedFeature</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE">RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE</a>) |
|
<span class="comment">// ErrWaitCache Local: Awaiting cache update</span> |
|
<span id="ErrWaitCache">ErrWaitCache</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__WAIT_CACHE">RD_KAFKA_RESP_ERR__WAIT_CACHE</a>) |
|
<span class="comment">// ErrIntr Local: Operation interrupted</span> |
|
<span id="ErrIntr">ErrIntr</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__INTR">RD_KAFKA_RESP_ERR__INTR</a>) |
|
<span class="comment">// ErrKeySerialization Local: Key serialization error</span> |
|
<span id="ErrKeySerialization">ErrKeySerialization</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__KEY_SERIALIZATION">RD_KAFKA_RESP_ERR__KEY_SERIALIZATION</a>) |
|
<span class="comment">// ErrValueSerialization Local: Value serialization error</span> |
|
<span id="ErrValueSerialization">ErrValueSerialization</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION">RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION</a>) |
|
<span class="comment">// ErrKeyDeserialization Local: Key deserialization error</span> |
|
<span id="ErrKeyDeserialization">ErrKeyDeserialization</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION">RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION</a>) |
|
<span class="comment">// ErrValueDeserialization Local: Value deserialization error</span> |
|
<span id="ErrValueDeserialization">ErrValueDeserialization</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION">RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION</a>) |
|
<span class="comment">// ErrPartial Local: Partial response</span> |
|
<span id="ErrPartial">ErrPartial</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__PARTIAL">RD_KAFKA_RESP_ERR__PARTIAL</a>) |
|
<span class="comment">// ErrReadOnly Local: Read-only object</span> |
|
<span id="ErrReadOnly">ErrReadOnly</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__READ_ONLY">RD_KAFKA_RESP_ERR__READ_ONLY</a>) |
|
<span class="comment">// ErrNoent Local: No such entry</span> |
|
<span id="ErrNoent">ErrNoent</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__NOENT">RD_KAFKA_RESP_ERR__NOENT</a>) |
|
<span class="comment">// ErrUnderflow Local: Read underflow</span> |
|
<span id="ErrUnderflow">ErrUnderflow</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__UNDERFLOW">RD_KAFKA_RESP_ERR__UNDERFLOW</a>) |
|
<span class="comment">// ErrInvalidType Local: Invalid type</span> |
|
<span id="ErrInvalidType">ErrInvalidType</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__INVALID_TYPE">RD_KAFKA_RESP_ERR__INVALID_TYPE</a>) |
|
<span class="comment">// ErrRetry Local: Retry operation</span> |
|
<span id="ErrRetry">ErrRetry</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__RETRY">RD_KAFKA_RESP_ERR__RETRY</a>) |
|
<span class="comment">// ErrPurgeQueue Local: Purged in queue</span> |
|
<span id="ErrPurgeQueue">ErrPurgeQueue</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__PURGE_QUEUE">RD_KAFKA_RESP_ERR__PURGE_QUEUE</a>) |
|
<span class="comment">// ErrPurgeInflight Local: Purged in flight</span> |
|
<span id="ErrPurgeInflight">ErrPurgeInflight</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__PURGE_INFLIGHT">RD_KAFKA_RESP_ERR__PURGE_INFLIGHT</a>) |
|
<span class="comment">// ErrFatal Local: Fatal error</span> |
|
<span id="ErrFatal">ErrFatal</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__FATAL">RD_KAFKA_RESP_ERR__FATAL</a>) |
|
<span class="comment">// ErrInconsistent Local: Inconsistent state</span> |
|
<span id="ErrInconsistent">ErrInconsistent</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__INCONSISTENT">RD_KAFKA_RESP_ERR__INCONSISTENT</a>) |
|
<span class="comment">// ErrGaplessGuarantee Local: Gap-less ordering would not be guaranteed if proceeding</span> |
|
<span id="ErrGaplessGuarantee">ErrGaplessGuarantee</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE">RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE</a>) |
|
<span class="comment">// ErrMaxPollExceeded Local: Maximum application poll interval (max.poll.interval.ms) exceeded</span> |
|
<span id="ErrMaxPollExceeded">ErrMaxPollExceeded</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED">RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED</a>) |
|
<span class="comment">// ErrUnknownBroker Local: Unknown broker</span> |
|
<span id="ErrUnknownBroker">ErrUnknownBroker</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__UNKNOWN_BROKER">RD_KAFKA_RESP_ERR__UNKNOWN_BROKER</a>) |
|
<span class="comment">// ErrNotConfigured Local: Functionality not configured</span> |
|
<span id="ErrNotConfigured">ErrNotConfigured</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__NOT_CONFIGURED">RD_KAFKA_RESP_ERR__NOT_CONFIGURED</a>) |
|
<span class="comment">// ErrFenced Local: This instance has been fenced by a newer instance</span> |
|
<span id="ErrFenced">ErrFenced</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__FENCED">RD_KAFKA_RESP_ERR__FENCED</a>) |
|
<span class="comment">// ErrApplication Local: Application generated error</span> |
|
<span id="ErrApplication">ErrApplication</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__APPLICATION">RD_KAFKA_RESP_ERR__APPLICATION</a>) |
|
<span class="comment">// ErrAssignmentLost Local: Group partition assignment lost</span> |
|
<span id="ErrAssignmentLost">ErrAssignmentLost</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST">RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST</a>) |
|
<span class="comment">// ErrNoop Local: No operation performed</span> |
|
<span id="ErrNoop">ErrNoop</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__NOOP">RD_KAFKA_RESP_ERR__NOOP</a>) |
|
<span class="comment">// ErrAutoOffsetReset Local: No offset to automatically reset to</span> |
|
<span id="ErrAutoOffsetReset">ErrAutoOffsetReset</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET">RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET</a>) |
|
<span class="comment">// ErrUnknown Unknown broker error</span> |
|
<span id="ErrUnknown">ErrUnknown</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNKNOWN">RD_KAFKA_RESP_ERR_UNKNOWN</a>) |
|
<span class="comment">// ErrNoError Success</span> |
|
<span id="ErrNoError">ErrNoError</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NO_ERROR">RD_KAFKA_RESP_ERR_NO_ERROR</a>) |
|
<span class="comment">// ErrOffsetOutOfRange Broker: Offset out of range</span> |
|
<span id="ErrOffsetOutOfRange">ErrOffsetOutOfRange</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE">RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE</a>) |
|
<span class="comment">// ErrInvalidMsg Broker: Invalid message</span> |
|
<span id="ErrInvalidMsg">ErrInvalidMsg</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_MSG">RD_KAFKA_RESP_ERR_INVALID_MSG</a>) |
|
<span class="comment">// ErrUnknownTopicOrPart Broker: Unknown topic or partition</span> |
|
<span id="ErrUnknownTopicOrPart">ErrUnknownTopicOrPart</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART">RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART</a>) |
|
<span class="comment">// ErrInvalidMsgSize Broker: Invalid message size</span> |
|
<span id="ErrInvalidMsgSize">ErrInvalidMsgSize</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE">RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE</a>) |
|
<span class="comment">// ErrLeaderNotAvailable Broker: Leader not available</span> |
|
<span id="ErrLeaderNotAvailable">ErrLeaderNotAvailable</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE">RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE</a>) |
|
<span class="comment">// ErrNotLeaderForPartition Broker: Not leader for partition</span> |
|
<span id="ErrNotLeaderForPartition">ErrNotLeaderForPartition</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION">RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION</a>) |
|
<span class="comment">// ErrRequestTimedOut Broker: Request timed out</span> |
|
<span id="ErrRequestTimedOut">ErrRequestTimedOut</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT">RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT</a>) |
|
<span class="comment">// ErrBrokerNotAvailable Broker: Broker not available</span> |
|
<span id="ErrBrokerNotAvailable">ErrBrokerNotAvailable</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE">RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE</a>) |
|
<span class="comment">// ErrReplicaNotAvailable Broker: Replica not available</span> |
|
<span id="ErrReplicaNotAvailable">ErrReplicaNotAvailable</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE">RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE</a>) |
|
<span class="comment">// ErrMsgSizeTooLarge Broker: Message size too large</span> |
|
<span id="ErrMsgSizeTooLarge">ErrMsgSizeTooLarge</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE">RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE</a>) |
|
<span class="comment">// ErrStaleCtrlEpoch Broker: StaleControllerEpochCode</span> |
|
<span id="ErrStaleCtrlEpoch">ErrStaleCtrlEpoch</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH">RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH</a>) |
|
<span class="comment">// ErrOffsetMetadataTooLarge Broker: Offset metadata string too large</span> |
|
<span id="ErrOffsetMetadataTooLarge">ErrOffsetMetadataTooLarge</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE">RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE</a>) |
|
<span class="comment">// ErrNetworkException Broker: Broker disconnected before response received</span> |
|
<span id="ErrNetworkException">ErrNetworkException</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION">RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION</a>) |
|
<span class="comment">// ErrCoordinatorLoadInProgress Broker: Coordinator load in progress</span> |
|
<span id="ErrCoordinatorLoadInProgress">ErrCoordinatorLoadInProgress</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS">RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS</a>) |
|
<span class="comment">// ErrCoordinatorNotAvailable Broker: Coordinator not available</span> |
|
<span id="ErrCoordinatorNotAvailable">ErrCoordinatorNotAvailable</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE">RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE</a>) |
|
<span class="comment">// ErrNotCoordinator Broker: Not coordinator</span> |
|
<span id="ErrNotCoordinator">ErrNotCoordinator</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NOT_COORDINATOR">RD_KAFKA_RESP_ERR_NOT_COORDINATOR</a>) |
|
<span class="comment">// ErrTopicException Broker: Invalid topic</span> |
|
<span id="ErrTopicException">ErrTopicException</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION">RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION</a>) |
|
<span class="comment">// ErrRecordListTooLarge Broker: Message batch larger than configured server segment size</span> |
|
<span id="ErrRecordListTooLarge">ErrRecordListTooLarge</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE">RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE</a>) |
|
<span class="comment">// ErrNotEnoughReplicas Broker: Not enough in-sync replicas</span> |
|
<span id="ErrNotEnoughReplicas">ErrNotEnoughReplicas</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS">RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS</a>) |
|
<span class="comment">// ErrNotEnoughReplicasAfterAppend Broker: Message(s) written to insufficient number of in-sync replicas</span> |
|
<span id="ErrNotEnoughReplicasAfterAppend">ErrNotEnoughReplicasAfterAppend</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND">RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND</a>) |
|
<span class="comment">// ErrInvalidRequiredAcks Broker: Invalid required acks value</span> |
|
<span id="ErrInvalidRequiredAcks">ErrInvalidRequiredAcks</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS">RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS</a>) |
|
<span class="comment">// ErrIllegalGeneration Broker: Specified group generation id is not valid</span> |
|
<span id="ErrIllegalGeneration">ErrIllegalGeneration</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION">RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION</a>) |
|
<span class="comment">// ErrInconsistentGroupProtocol Broker: Inconsistent group protocol</span> |
|
<span id="ErrInconsistentGroupProtocol">ErrInconsistentGroupProtocol</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL">RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL</a>) |
|
<span class="comment">// ErrInvalidGroupID Broker: Invalid group.id</span> |
|
<span id="ErrInvalidGroupID">ErrInvalidGroupID</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_GROUP_ID">RD_KAFKA_RESP_ERR_INVALID_GROUP_ID</a>) |
|
<span class="comment">// ErrUnknownMemberID Broker: Unknown member</span> |
|
<span id="ErrUnknownMemberID">ErrUnknownMemberID</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID">RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID</a>) |
|
<span class="comment">// ErrInvalidSessionTimeout Broker: Invalid session timeout</span> |
|
<span id="ErrInvalidSessionTimeout">ErrInvalidSessionTimeout</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT">RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT</a>) |
|
<span class="comment">// ErrRebalanceInProgress Broker: Group rebalance in progress</span> |
|
<span id="ErrRebalanceInProgress">ErrRebalanceInProgress</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS">RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS</a>) |
|
<span class="comment">// ErrInvalidCommitOffsetSize Broker: Commit offset data size is not valid</span> |
|
<span id="ErrInvalidCommitOffsetSize">ErrInvalidCommitOffsetSize</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE">RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE</a>) |
|
<span class="comment">// ErrTopicAuthorizationFailed Broker: Topic authorization failed</span> |
|
<span id="ErrTopicAuthorizationFailed">ErrTopicAuthorizationFailed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED">RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED</a>) |
|
<span class="comment">// ErrGroupAuthorizationFailed Broker: Group authorization failed</span> |
|
<span id="ErrGroupAuthorizationFailed">ErrGroupAuthorizationFailed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED">RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED</a>) |
|
<span class="comment">// ErrClusterAuthorizationFailed Broker: Cluster authorization failed</span> |
|
<span id="ErrClusterAuthorizationFailed">ErrClusterAuthorizationFailed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED">RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED</a>) |
|
<span class="comment">// ErrInvalidTimestamp Broker: Invalid timestamp</span> |
|
<span id="ErrInvalidTimestamp">ErrInvalidTimestamp</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP">RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP</a>) |
|
<span class="comment">// ErrUnsupportedSaslMechanism Broker: Unsupported SASL mechanism</span> |
|
<span id="ErrUnsupportedSaslMechanism">ErrUnsupportedSaslMechanism</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM">RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM</a>) |
|
<span class="comment">// ErrIllegalSaslState Broker: Request not valid in current SASL state</span> |
|
<span id="ErrIllegalSaslState">ErrIllegalSaslState</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE">RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE</a>) |
|
<span class="comment">// ErrUnsupportedVersion Broker: API version not supported</span> |
|
<span id="ErrUnsupportedVersion">ErrUnsupportedVersion</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION">RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION</a>) |
|
<span class="comment">// ErrTopicAlreadyExists Broker: Topic already exists</span> |
|
<span id="ErrTopicAlreadyExists">ErrTopicAlreadyExists</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS">RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS</a>) |
|
<span class="comment">// ErrInvalidPartitions Broker: Invalid number of partitions</span> |
|
<span id="ErrInvalidPartitions">ErrInvalidPartitions</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_PARTITIONS">RD_KAFKA_RESP_ERR_INVALID_PARTITIONS</a>) |
|
<span class="comment">// ErrInvalidReplicationFactor Broker: Invalid replication factor</span> |
|
<span id="ErrInvalidReplicationFactor">ErrInvalidReplicationFactor</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR">RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR</a>) |
|
<span class="comment">// ErrInvalidReplicaAssignment Broker: Invalid replica assignment</span> |
|
<span id="ErrInvalidReplicaAssignment">ErrInvalidReplicaAssignment</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT">RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT</a>) |
|
<span class="comment">// ErrInvalidConfig Broker: Configuration is invalid</span> |
|
<span id="ErrInvalidConfig">ErrInvalidConfig</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_CONFIG">RD_KAFKA_RESP_ERR_INVALID_CONFIG</a>) |
|
<span class="comment">// ErrNotController Broker: Not controller for cluster</span> |
|
<span id="ErrNotController">ErrNotController</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NOT_CONTROLLER">RD_KAFKA_RESP_ERR_NOT_CONTROLLER</a>) |
|
<span class="comment">// ErrInvalidRequest Broker: Invalid request</span> |
|
<span id="ErrInvalidRequest">ErrInvalidRequest</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_REQUEST">RD_KAFKA_RESP_ERR_INVALID_REQUEST</a>) |
|
<span class="comment">// ErrUnsupportedForMessageFormat Broker: Message format on broker does not support request</span> |
|
<span id="ErrUnsupportedForMessageFormat">ErrUnsupportedForMessageFormat</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT">RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT</a>) |
|
<span class="comment">// ErrPolicyViolation Broker: Policy violation</span> |
|
<span id="ErrPolicyViolation">ErrPolicyViolation</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_POLICY_VIOLATION">RD_KAFKA_RESP_ERR_POLICY_VIOLATION</a>) |
|
<span class="comment">// ErrOutOfOrderSequenceNumber Broker: Broker received an out of order sequence number</span> |
|
<span id="ErrOutOfOrderSequenceNumber">ErrOutOfOrderSequenceNumber</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER">RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER</a>) |
|
<span class="comment">// ErrDuplicateSequenceNumber Broker: Broker received a duplicate sequence number</span> |
|
<span id="ErrDuplicateSequenceNumber">ErrDuplicateSequenceNumber</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER">RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER</a>) |
|
<span class="comment">// ErrInvalidProducerEpoch Broker: Producer attempted an operation with an old epoch</span> |
|
<span id="ErrInvalidProducerEpoch">ErrInvalidProducerEpoch</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH">RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH</a>) |
|
<span class="comment">// ErrInvalidTxnState Broker: Producer attempted a transactional operation in an invalid state</span> |
|
<span id="ErrInvalidTxnState">ErrInvalidTxnState</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_TXN_STATE">RD_KAFKA_RESP_ERR_INVALID_TXN_STATE</a>) |
|
<span class="comment">// ErrInvalidProducerIDMapping Broker: Producer attempted to use a producer id which is not currently assigned to its transactional id</span> |
|
<span id="ErrInvalidProducerIDMapping">ErrInvalidProducerIDMapping</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING">RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING</a>) |
|
<span class="comment">// ErrInvalidTransactionTimeout Broker: Transaction timeout is larger than the maximum value allowed by the broker's max.transaction.timeout.ms</span> |
|
<span id="ErrInvalidTransactionTimeout">ErrInvalidTransactionTimeout</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT">RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT</a>) |
|
<span class="comment">// ErrConcurrentTransactions Broker: Producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing</span> |
|
<span id="ErrConcurrentTransactions">ErrConcurrentTransactions</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS">RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS</a>) |
|
<span class="comment">// ErrTransactionCoordinatorFenced Broker: Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer</span> |
|
<span id="ErrTransactionCoordinatorFenced">ErrTransactionCoordinatorFenced</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED">RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED</a>) |
|
<span class="comment">// ErrTransactionalIDAuthorizationFailed Broker: Transactional Id authorization failed</span> |
|
<span id="ErrTransactionalIDAuthorizationFailed">ErrTransactionalIDAuthorizationFailed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED">RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED</a>) |
|
<span class="comment">// ErrSecurityDisabled Broker: Security features are disabled</span> |
|
<span id="ErrSecurityDisabled">ErrSecurityDisabled</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_SECURITY_DISABLED">RD_KAFKA_RESP_ERR_SECURITY_DISABLED</a>) |
|
<span class="comment">// ErrOperationNotAttempted Broker: Operation not attempted</span> |
|
<span id="ErrOperationNotAttempted">ErrOperationNotAttempted</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED">RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED</a>) |
|
<span class="comment">// ErrKafkaStorageError Broker: Disk error when trying to access log file on disk</span> |
|
<span id="ErrKafkaStorageError">ErrKafkaStorageError</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR">RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR</a>) |
|
<span class="comment">// ErrLogDirNotFound Broker: The user-specified log directory is not found in the broker config</span> |
|
<span id="ErrLogDirNotFound">ErrLogDirNotFound</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND">RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND</a>) |
|
<span class="comment">// ErrSaslAuthenticationFailed Broker: SASL Authentication failed</span> |
|
<span id="ErrSaslAuthenticationFailed">ErrSaslAuthenticationFailed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED">RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED</a>) |
|
<span class="comment">// ErrUnknownProducerID Broker: Unknown Producer Id</span> |
|
<span id="ErrUnknownProducerID">ErrUnknownProducerID</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID">RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID</a>) |
|
<span class="comment">// ErrReassignmentInProgress Broker: Partition reassignment is in progress</span> |
|
<span id="ErrReassignmentInProgress">ErrReassignmentInProgress</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS">RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS</a>) |
|
<span class="comment">// ErrDelegationTokenAuthDisabled Broker: Delegation Token feature is not enabled</span> |
|
<span id="ErrDelegationTokenAuthDisabled">ErrDelegationTokenAuthDisabled</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED">RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED</a>) |
|
<span class="comment">// ErrDelegationTokenNotFound Broker: Delegation Token is not found on server</span> |
|
<span id="ErrDelegationTokenNotFound">ErrDelegationTokenNotFound</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND">RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND</a>) |
|
<span class="comment">// ErrDelegationTokenOwnerMismatch Broker: Specified Principal is not valid Owner/Renewer</span> |
|
<span id="ErrDelegationTokenOwnerMismatch">ErrDelegationTokenOwnerMismatch</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH">RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH</a>) |
|
<span class="comment">// ErrDelegationTokenRequestNotAllowed Broker: Delegation Token requests are not allowed on this connection</span> |
|
<span id="ErrDelegationTokenRequestNotAllowed">ErrDelegationTokenRequestNotAllowed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED">RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED</a>) |
|
<span class="comment">// ErrDelegationTokenAuthorizationFailed Broker: Delegation Token authorization failed</span> |
|
<span id="ErrDelegationTokenAuthorizationFailed">ErrDelegationTokenAuthorizationFailed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED">RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED</a>) |
|
<span class="comment">// ErrDelegationTokenExpired Broker: Delegation Token is expired</span> |
|
<span id="ErrDelegationTokenExpired">ErrDelegationTokenExpired</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED">RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED</a>) |
|
<span class="comment">// ErrInvalidPrincipalType Broker: Supplied principalType is not supported</span> |
|
<span id="ErrInvalidPrincipalType">ErrInvalidPrincipalType</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE">RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE</a>) |
|
<span class="comment">// ErrNonEmptyGroup Broker: The group is not empty</span> |
|
<span id="ErrNonEmptyGroup">ErrNonEmptyGroup</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP">RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP</a>) |
|
<span class="comment">// ErrGroupIDNotFound Broker: The group id does not exist</span> |
|
<span id="ErrGroupIDNotFound">ErrGroupIDNotFound</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND">RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND</a>) |
|
<span class="comment">// ErrFetchSessionIDNotFound Broker: The fetch session ID was not found</span> |
|
<span id="ErrFetchSessionIDNotFound">ErrFetchSessionIDNotFound</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND">RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND</a>) |
|
<span class="comment">// ErrInvalidFetchSessionEpoch Broker: The fetch session epoch is invalid</span> |
|
<span id="ErrInvalidFetchSessionEpoch">ErrInvalidFetchSessionEpoch</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH">RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH</a>) |
|
<span class="comment">// ErrListenerNotFound Broker: No matching listener</span> |
|
<span id="ErrListenerNotFound">ErrListenerNotFound</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND">RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND</a>) |
|
<span class="comment">// ErrTopicDeletionDisabled Broker: Topic deletion is disabled</span> |
|
<span id="ErrTopicDeletionDisabled">ErrTopicDeletionDisabled</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED">RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED</a>) |
|
<span class="comment">// ErrFencedLeaderEpoch Broker: Leader epoch is older than broker epoch</span> |
|
<span id="ErrFencedLeaderEpoch">ErrFencedLeaderEpoch</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH">RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH</a>) |
|
<span class="comment">// ErrUnknownLeaderEpoch Broker: Leader epoch is newer than broker epoch</span> |
|
<span id="ErrUnknownLeaderEpoch">ErrUnknownLeaderEpoch</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH">RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH</a>) |
|
<span class="comment">// ErrUnsupportedCompressionType Broker: Unsupported compression type</span> |
|
<span id="ErrUnsupportedCompressionType">ErrUnsupportedCompressionType</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE">RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE</a>) |
|
<span class="comment">// ErrStaleBrokerEpoch Broker: Broker epoch has changed</span> |
|
<span id="ErrStaleBrokerEpoch">ErrStaleBrokerEpoch</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH">RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH</a>) |
|
<span class="comment">// ErrOffsetNotAvailable Broker: Leader high watermark is not caught up</span> |
|
<span id="ErrOffsetNotAvailable">ErrOffsetNotAvailable</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE">RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE</a>) |
|
<span class="comment">// ErrMemberIDRequired Broker: Group member needs a valid member ID</span> |
|
<span id="ErrMemberIDRequired">ErrMemberIDRequired</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED">RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED</a>) |
|
<span class="comment">// ErrPreferredLeaderNotAvailable Broker: Preferred leader was not available</span> |
|
<span id="ErrPreferredLeaderNotAvailable">ErrPreferredLeaderNotAvailable</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE">RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE</a>) |
|
<span class="comment">// ErrGroupMaxSizeReached Broker: Consumer group has reached maximum size</span> |
|
<span id="ErrGroupMaxSizeReached">ErrGroupMaxSizeReached</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED">RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED</a>) |
|
<span class="comment">// ErrFencedInstanceID Broker: Static consumer fenced by other consumer with same group.instance.id</span> |
|
<span id="ErrFencedInstanceID">ErrFencedInstanceID</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID">RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID</a>) |
|
<span class="comment">// ErrEligibleLeadersNotAvailable Broker: Eligible partition leaders are not available</span> |
|
<span id="ErrEligibleLeadersNotAvailable">ErrEligibleLeadersNotAvailable</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE">RD_KAFKA_RESP_ERR_ELIGIBLE_LEADERS_NOT_AVAILABLE</a>) |
|
<span class="comment">// ErrElectionNotNeeded Broker: Leader election not needed for topic partition</span> |
|
<span id="ErrElectionNotNeeded">ErrElectionNotNeeded</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED">RD_KAFKA_RESP_ERR_ELECTION_NOT_NEEDED</a>) |
|
<span class="comment">// ErrNoReassignmentInProgress Broker: No partition reassignment is in progress</span> |
|
<span id="ErrNoReassignmentInProgress">ErrNoReassignmentInProgress</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS">RD_KAFKA_RESP_ERR_NO_REASSIGNMENT_IN_PROGRESS</a>) |
|
<span class="comment">// ErrGroupSubscribedToTopic Broker: Deleting offsets of a topic while the consumer group is subscribed to it</span> |
|
<span id="ErrGroupSubscribedToTopic">ErrGroupSubscribedToTopic</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC">RD_KAFKA_RESP_ERR_GROUP_SUBSCRIBED_TO_TOPIC</a>) |
|
<span class="comment">// ErrInvalidRecord Broker: Broker failed to validate record</span> |
|
<span id="ErrInvalidRecord">ErrInvalidRecord</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_RECORD">RD_KAFKA_RESP_ERR_INVALID_RECORD</a>) |
|
<span class="comment">// ErrUnstableOffsetCommit Broker: There are unstable offsets that need to be cleared</span> |
|
<span id="ErrUnstableOffsetCommit">ErrUnstableOffsetCommit</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT">RD_KAFKA_RESP_ERR_UNSTABLE_OFFSET_COMMIT</a>) |
|
<span class="comment">// ErrThrottlingQuotaExceeded Broker: Throttling quota has been exceeded</span> |
|
<span id="ErrThrottlingQuotaExceeded">ErrThrottlingQuotaExceeded</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED">RD_KAFKA_RESP_ERR_THROTTLING_QUOTA_EXCEEDED</a>) |
|
<span class="comment">// ErrProducerFenced Broker: There is a newer producer with the same transactionalId which fences the current one</span> |
|
<span id="ErrProducerFenced">ErrProducerFenced</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_PRODUCER_FENCED">RD_KAFKA_RESP_ERR_PRODUCER_FENCED</a>) |
|
<span class="comment">// ErrResourceNotFound Broker: Request illegally referred to resource that does not exist</span> |
|
<span id="ErrResourceNotFound">ErrResourceNotFound</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND">RD_KAFKA_RESP_ERR_RESOURCE_NOT_FOUND</a>) |
|
<span class="comment">// ErrDuplicateResource Broker: Request illegally referred to the same resource twice</span> |
|
<span id="ErrDuplicateResource">ErrDuplicateResource</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE">RD_KAFKA_RESP_ERR_DUPLICATE_RESOURCE</a>) |
|
<span class="comment">// ErrUnacceptableCredential Broker: Requested credential would not meet criteria for acceptability</span> |
|
<span id="ErrUnacceptableCredential">ErrUnacceptableCredential</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL">RD_KAFKA_RESP_ERR_UNACCEPTABLE_CREDENTIAL</a>) |
|
<span class="comment">// ErrInconsistentVoterSet Broker: Indicates that the either the sender or recipient of a voter-only request is not one of the expected voters</span> |
|
<span id="ErrInconsistentVoterSet">ErrInconsistentVoterSet</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET">RD_KAFKA_RESP_ERR_INCONSISTENT_VOTER_SET</a>) |
|
<span class="comment">// ErrInvalidUpdateVersion Broker: Invalid update version</span> |
|
<span id="ErrInvalidUpdateVersion">ErrInvalidUpdateVersion</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION">RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION</a>) |
|
<span class="comment">// ErrFeatureUpdateFailed Broker: Unable to update finalized features due to server error</span> |
|
<span id="ErrFeatureUpdateFailed">ErrFeatureUpdateFailed</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED">RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED</a>) |
|
<span class="comment">// ErrPrincipalDeserializationFailure Broker: Request principal deserialization failed during forwarding</span> |
|
<span id="ErrPrincipalDeserializationFailure">ErrPrincipalDeserializationFailure</span> <a href="#ErrorCode">ErrorCode</a> = <a href="#ErrorCode">ErrorCode</a>(<a href="https://pkg.go.dev/C/">C</a>.<a href="https://pkg.go.dev/C/#RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE">RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE</a>) |
|
)</pre> |
|
<h3 id="ErrorCode.String"> |
|
func (ErrorCode) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/generated_errors.go?s=370:404#L4"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ErrorCode.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (c <a href="#ErrorCode">ErrorCode</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human readable representation of an error code |
|
</p> |
|
<h2 id="Event"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=2222:2327#L74"> |
|
Event |
|
</a> |
|
<a class="permalink" href="#Event"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Event generic interface |
|
</p> |
|
<pre>type Event interface { |
|
<span class="comment">// String returns a human-readable representation of the event</span> |
|
String() <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
}</pre> |
|
<h2 id="Handle"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/handle.go?s=1832:3101#L46"> |
|
Handle |
|
</a> |
|
<a class="permalink" href="#Handle"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Handle represents a generic client handle containing common parts for |
|
both Producer and Consumer. |
|
</p> |
|
<pre>type Handle interface { |
|
<span class="comment">// SetOAuthBearerToken sets the the data to be transmitted</span> |
|
<span class="comment">// to a broker during SASL/OAUTHBEARER authentication. It will return nil</span> |
|
<span class="comment">// on success, otherwise an error if:</span> |
|
<span class="comment">// 1) the token data is invalid (meaning an expiration time in the past</span> |
|
<span class="comment">// or either a token value or an extension key or value that does not meet</span> |
|
<span class="comment">// the regular expression requirements as per</span> |
|
<span class="comment">// https://tools.ietf.org/html/rfc7628#section-3.1);</span> |
|
<span class="comment">// 2) SASL/OAUTHBEARER is not supported by the underlying librdkafka build;</span> |
|
<span class="comment">// 3) SASL/OAUTHBEARER is supported but is not configured as the client's</span> |
|
<span class="comment">// authentication mechanism.</span> |
|
SetOAuthBearerToken(oauthBearerToken <a href="#OAuthBearerToken">OAuthBearerToken</a>) <a href="https://pkg.go.dev/builtin/#error">error</a> |
|
|
|
<span class="comment">// SetOAuthBearerTokenFailure sets the error message describing why token</span> |
|
<span class="comment">// retrieval/setting failed; it also schedules a new token refresh event for 10</span> |
|
<span class="comment">// seconds later so the attempt may be retried. It will return nil on</span> |
|
<span class="comment">// success, otherwise an error if:</span> |
|
<span class="comment">// 1) SASL/OAUTHBEARER is not supported by the underlying librdkafka build;</span> |
|
<span class="comment">// 2) SASL/OAUTHBEARER is supported but is not configured as the client's</span> |
|
<span class="comment">// authentication mechanism.</span> |
|
SetOAuthBearerTokenFailure(errstr <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="https://pkg.go.dev/builtin/#error">error</a> |
|
<span class="comment">// contains filtered or unexported methods</span> |
|
}</pre> |
|
<h2 id="Header"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/header.go?s=1264:1384#L32"> |
|
Header |
|
</a> |
|
<a class="permalink" href="#Header"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Header represents a single Kafka message header. |
|
</p> |
|
<p> |
|
Message headers are made up of a list of Header elements, retaining their original insert |
|
order and allowing for duplicate Keys. |
|
</p> |
|
<p> |
|
Key is a human readable string identifying the header. |
|
Value is the key's binary value, Kafka does not put any restrictions on the format of |
|
of the Value but it should be made relatively compact. |
|
The value may be a byte array, empty, or nil. |
|
</p> |
|
<p> |
|
NOTE: Message headers are not available on producer delivery report messages. |
|
</p> |
|
<pre>type Header struct { |
|
<span id="Header.Key"></span> Key <a href="https://pkg.go.dev/builtin/#string">string</a> <span class="comment">// Header name (utf-8 string)</span> |
|
<span id="Header.Value"></span> Value []<a href="https://pkg.go.dev/builtin/#byte">byte</a> <span class="comment">// Header value (nil, empty, or binary)</span> |
|
} |
|
</pre> |
|
<h3 id="Header.String"> |
|
func (Header) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/header.go?s=1517:1548#L39"> |
|
String |
|
</a> |
|
<a class="permalink" href="#Header.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (h <a href="#Header">Header</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns the Header Key and data in a human representable possibly truncated form |
|
suitable for displaying to the user. |
|
</p> |
|
<h2 id="LogEvent"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/log.go?s=153:471#L4"> |
|
LogEvent |
|
</a> |
|
<a class="permalink" href="#LogEvent"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
LogEvent represent the log from librdkafka internal log queue |
|
</p> |
|
<pre>type LogEvent struct { |
|
<span id="LogEvent.Name"></span> Name <a href="https://pkg.go.dev/builtin/#string">string</a> <span class="comment">// Name of client instance</span> |
|
<span id="LogEvent.Tag"></span> Tag <a href="https://pkg.go.dev/builtin/#string">string</a> <span class="comment">// Log tag that provides context to the log Message (e.g., "METADATA" or "GRPCOORD")</span> |
|
<span id="LogEvent.Message"></span> Message <a href="https://pkg.go.dev/builtin/#string">string</a> <span class="comment">// Log message</span> |
|
<span id="LogEvent.Level"></span> Level <a href="https://pkg.go.dev/builtin/#int">int</a> <span class="comment">// Log syslog level, lower is more critical.</span> |
|
<span id="LogEvent.Timestamp"></span> Timestamp <a href="https://pkg.go.dev/time/">time</a>.<a href="https://pkg.go.dev/time/#Time">Time</a> <span class="comment">// Log timestamp</span> |
|
} |
|
</pre> |
|
<h3 id="LogEvent.String"> |
|
func (LogEvent) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/log.go?s=2032:2072#L71"> |
|
String |
|
</a> |
|
<a class="permalink" href="#LogEvent.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (logEvent <a href="#LogEvent">LogEvent</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="Message"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/message.go?s=2118:2327#L63"> |
|
Message |
|
</a> |
|
<a class="permalink" href="#Message"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Message represents a Kafka message |
|
</p> |
|
<pre>type Message struct { |
|
<span id="Message.TopicPartition"></span> TopicPartition <a href="#TopicPartition">TopicPartition</a> |
|
<span id="Message.Value"></span> Value []<a href="https://pkg.go.dev/builtin/#byte">byte</a> |
|
<span id="Message.Key"></span> Key []<a href="https://pkg.go.dev/builtin/#byte">byte</a> |
|
<span id="Message.Timestamp"></span> Timestamp <a href="https://pkg.go.dev/time/">time</a>.<a href="https://pkg.go.dev/time/#Time">Time</a> |
|
<span id="Message.TimestampType"></span> TimestampType <a href="#TimestampType">TimestampType</a> |
|
<span id="Message.Opaque"></span> Opaque interface{} |
|
<span id="Message.Headers"></span> Headers []<a href="#Header">Header</a> |
|
} |
|
</pre> |
|
<h3 id="Message.String"> |
|
func (*Message) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/message.go?s=2433:2466#L75"> |
|
String |
|
</a> |
|
<a class="permalink" href="#Message.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (m *<a href="#Message">Message</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human readable representation of a Message. |
|
Key and payload are not represented. |
|
</p> |
|
<h2 id="Metadata"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/metadata.go?s=1719:1838#L60"> |
|
Metadata |
|
</a> |
|
<a class="permalink" href="#Metadata"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Metadata contains broker and topic metadata for all (matching) topics |
|
</p> |
|
<pre>type Metadata struct { |
|
<span id="Metadata.Brokers"></span> Brokers []<a href="#BrokerMetadata">BrokerMetadata</a> |
|
<span id="Metadata.Topics"></span> Topics map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="#TopicMetadata">TopicMetadata</a> |
|
|
|
<span id="Metadata.OriginatingBroker"></span> OriginatingBroker <a href="#BrokerMetadata">BrokerMetadata</a> |
|
} |
|
</pre> |
|
<h2 id="MockCluster"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/mockcluster.go?s=810:898#L20"> |
|
MockCluster |
|
</a> |
|
<a class="permalink" href="#MockCluster"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
MockCluster represents a Kafka mock cluster instance which can be used |
|
for testing. |
|
</p> |
|
<pre>type MockCluster struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="NewMockCluster"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/mockcluster.go?s=1510:1568#L41"> |
|
NewMockCluster |
|
</a> |
|
<a class="permalink" href="#NewMockCluster"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewMockCluster(brokerCount <a href="https://pkg.go.dev/builtin/#int">int</a>) (*<a href="#MockCluster">MockCluster</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewMockCluster provides a mock Kafka cluster with a configurable |
|
number of brokers that support a reasonable subset of Kafka protocol |
|
operations, error injection, etc. |
|
</p> |
|
<p> |
|
Mock clusters provide localhost listeners that can be used as the bootstrap |
|
servers by multiple Kafka client instances. |
|
</p> |
|
<p> |
|
Currently supported functionality: |
|
- Producer |
|
- Idempotent Producer |
|
- Transactional Producer |
|
- Low-level consumer |
|
- High-level balanced consumer groups with offset commits |
|
- Topic Metadata and auto creation |
|
</p> |
|
<p> |
|
Warning THIS IS AN EXPERIMENTAL API, SUBJECT TO CHANGE OR REMOVAL. |
|
</p> |
|
<h3 id="MockCluster.BootstrapServers"> |
|
func (*MockCluster) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/mockcluster.go?s=2217:2265#L66"> |
|
BootstrapServers |
|
</a> |
|
<a class="permalink" href="#MockCluster.BootstrapServers"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (mc *<a href="#MockCluster">MockCluster</a>) BootstrapServers() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
BootstrapServers returns the bootstrap.servers property for this MockCluster |
|
</p> |
|
<h3 id="MockCluster.Close"> |
|
func (*MockCluster) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/mockcluster.go?s=2376:2406#L71"> |
|
Close |
|
</a> |
|
<a class="permalink" href="#MockCluster.Close"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (mc *<a href="#MockCluster">MockCluster</a>) Close()</pre> |
|
<p> |
|
Close and destroy the MockCluster |
|
</p> |
|
<h2 id="OAuthBearerToken"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/handle.go?s=846:1726#L25"> |
|
OAuthBearerToken |
|
</a> |
|
<a class="permalink" href="#OAuthBearerToken"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
OAuthBearerToken represents the data to be transmitted |
|
to a broker during SASL/OAUTHBEARER authentication. |
|
</p> |
|
<pre>type OAuthBearerToken struct { |
|
<span class="comment">// Token value, often (but not necessarily) a JWS compact serialization</span> |
|
<span class="comment">// as per https://tools.ietf.org/html/rfc7515#section-3.1; it must meet</span> |
|
<span class="comment">// the regular expression for a SASL/OAUTHBEARER value defined at</span> |
|
<span class="comment">// https://tools.ietf.org/html/rfc7628#section-3.1</span> |
|
<span id="OAuthBearerToken.TokenValue"></span> TokenValue <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span class="comment">// Metadata about the token indicating when it expires (local time);</span> |
|
<span class="comment">// it must represent a time in the future</span> |
|
<span id="OAuthBearerToken.Expiration"></span> Expiration <a href="https://pkg.go.dev/time/">time</a>.<a href="https://pkg.go.dev/time/#Time">Time</a> |
|
<span class="comment">// Metadata about the token indicating the Kafka principal name</span> |
|
<span class="comment">// to which it applies (for example, "admin")</span> |
|
<span id="OAuthBearerToken.Principal"></span> Principal <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span class="comment">// SASL extensions, if any, to be communicated to the broker during</span> |
|
<span class="comment">// authentication (all keys and values of which must meet the regular</span> |
|
<span class="comment">// expressions defined at https://tools.ietf.org/html/rfc7628#section-3.1,</span> |
|
<span class="comment">// and it must not contain the reserved "auth" key)</span> |
|
<span id="OAuthBearerToken.Extensions"></span> Extensions map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="https://pkg.go.dev/builtin/#string">string</a> |
|
} |
|
</pre> |
|
<h2 id="OAuthBearerTokenRefresh"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=3560:3678#L128"> |
|
OAuthBearerTokenRefresh |
|
</a> |
|
<a class="permalink" href="#OAuthBearerTokenRefresh"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
OAuthBearerTokenRefresh indicates token refresh is required |
|
</p> |
|
<pre>type OAuthBearerTokenRefresh struct { |
|
<span id="OAuthBearerTokenRefresh.Config"></span> <span class="comment">// Config is the value of the sasl.oauthbearer.config property</span> |
|
Config <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
} |
|
</pre> |
|
<h3 id="OAuthBearerTokenRefresh.String"> |
|
func (OAuthBearerTokenRefresh) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=3680:3728#L133"> |
|
String |
|
</a> |
|
<a class="permalink" href="#OAuthBearerTokenRefresh.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (o <a href="#OAuthBearerTokenRefresh">OAuthBearerTokenRefresh</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="Offset"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/offset.go?s=856:873#L25"> |
|
Offset |
|
</a> |
|
<a class="permalink" href="#Offset"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Offset type (int64) with support for canonical names |
|
</p> |
|
<pre>type Offset <a href="https://pkg.go.dev/builtin/#int64">int64</a></pre> |
|
<h3 id="NewOffset"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/offset.go?s=1920:1970#L68"> |
|
NewOffset |
|
</a> |
|
<a class="permalink" href="#NewOffset"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewOffset(offset interface{}) (<a href="#Offset">Offset</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewOffset creates a new Offset using the provided logical string, or an |
|
absolute int64 offset value. |
|
Logical offsets: "beginning", "earliest", "end", "latest", "unset", "invalid", "stored" |
|
</p> |
|
<h3 id="OffsetTail"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/offset.go?s=2706:2751#L107"> |
|
OffsetTail |
|
</a> |
|
<a class="permalink" href="#OffsetTail"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func OffsetTail(relativeOffset <a href="#Offset">Offset</a>) <a href="#Offset">Offset</a></pre> |
|
<p> |
|
OffsetTail returns the logical offset relativeOffset from current end of partition |
|
</p> |
|
<h3 id="Offset.Set"> |
|
func (*Offset) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/offset.go?s=1598:1644#L55"> |
|
Set |
|
</a> |
|
<a class="permalink" href="#Offset.Set"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (o *<a href="#Offset">Offset</a>) Set(offset interface{}) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
Set offset value, see NewOffset() |
|
</p> |
|
<h3 id="Offset.String"> |
|
func (Offset) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/offset.go?s=1310:1341#L39"> |
|
String |
|
</a> |
|
<a class="permalink" href="#Offset.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (o <a href="#Offset">Offset</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="OffsetsCommitted"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=3306:3379#L118"> |
|
OffsetsCommitted |
|
</a> |
|
<a class="permalink" href="#OffsetsCommitted"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
OffsetsCommitted reports committed offsets |
|
</p> |
|
<pre>type OffsetsCommitted struct { |
|
<span id="OffsetsCommitted.Error"></span> Error <a href="https://pkg.go.dev/builtin/#error">error</a> |
|
<span id="OffsetsCommitted.Offsets"></span> Offsets []<a href="#TopicPartition">TopicPartition</a> |
|
} |
|
</pre> |
|
<h3 id="OffsetsCommitted.String"> |
|
func (OffsetsCommitted) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=3381:3422#L123"> |
|
String |
|
</a> |
|
<a class="permalink" href="#OffsetsCommitted.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (o <a href="#OffsetsCommitted">OffsetsCommitted</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="PartitionEOF"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=3131:3163#L111"> |
|
PartitionEOF |
|
</a> |
|
<a class="permalink" href="#PartitionEOF"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
PartitionEOF consumer reached end of partition |
|
Needs to be explicitly enabled by setting the `enable.partition.eof` |
|
configuration property to true. |
|
</p> |
|
<pre>type PartitionEOF <a href="#TopicPartition">TopicPartition</a></pre> |
|
<h3 id="PartitionEOF.String"> |
|
func (PartitionEOF) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=3165:3202#L113"> |
|
String |
|
</a> |
|
<a class="permalink" href="#PartitionEOF.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p <a href="#PartitionEOF">PartitionEOF</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="PartitionMetadata"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/metadata.go?s=1382:1499#L44"> |
|
PartitionMetadata |
|
</a> |
|
<a class="permalink" href="#PartitionMetadata"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
PartitionMetadata contains per-partition metadata |
|
</p> |
|
<pre>type PartitionMetadata struct { |
|
<span id="PartitionMetadata.ID"></span> ID <a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
<span id="PartitionMetadata.Error"></span> Error <a href="#Error">Error</a> |
|
<span id="PartitionMetadata.Leader"></span> Leader <a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
<span id="PartitionMetadata.Replicas"></span> Replicas []<a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
<span id="PartitionMetadata.Isrs"></span> Isrs []<a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
} |
|
</pre> |
|
<h2 id="PartitionsSpecification"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=3606:4120#L115"> |
|
PartitionsSpecification |
|
</a> |
|
<a class="permalink" href="#PartitionsSpecification"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
PartitionsSpecification holds parameters for creating additional partitions for a topic. |
|
PartitionsSpecification is analogous to NewPartitions in the Java Topic Admin API. |
|
</p> |
|
<pre>type PartitionsSpecification struct { |
|
<span id="PartitionsSpecification.Topic"></span> <span class="comment">// Topic to create more partitions for.</span> |
|
Topic <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span class="comment">// New partition count for topic, must be higher than current partition count.</span> |
|
<span id="PartitionsSpecification.IncreaseTo"></span> IncreaseTo <a href="https://pkg.go.dev/builtin/#int">int</a> |
|
<span class="comment">// (Optional) Explicit replica assignment. The outer array is</span> |
|
<span class="comment">// indexed by the new partition index (i.e., 0 for the first added</span> |
|
<span class="comment">// partition), while the inner per-partition array</span> |
|
<span class="comment">// contains the replica broker ids. The first broker in each</span> |
|
<span class="comment">// broker id list will be the preferred replica.</span> |
|
<span id="PartitionsSpecification.ReplicaAssignment"></span> ReplicaAssignment [][]<a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
} |
|
</pre> |
|
<h2 id="Producer"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=3609:3778#L122"> |
|
Producer |
|
</a> |
|
<a class="permalink" href="#Producer"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Producer implements a High-level Apache Kafka Producer instance |
|
</p> |
|
<pre>type Producer struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="NewProducer"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=14023:14075#L424"> |
|
NewProducer |
|
</a> |
|
<a class="permalink" href="#NewProducer"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func NewProducer(conf *<a href="#ConfigMap">ConfigMap</a>) (*<a href="#Producer">Producer</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
NewProducer creates a new high-level Producer instance. |
|
</p> |
|
<p> |
|
conf is a *ConfigMap with standard librdkafka configuration properties. |
|
</p> |
|
<p> |
|
Supported special configuration properties (type, default): |
|
</p> |
|
<pre>go.batch.producer (bool, false) - EXPERIMENTAL: Enable batch producer (for increased performance). |
|
These batches do not relate to Kafka message batches in any way. |
|
Note: timestamps and headers are not supported with this interface. |
|
go.delivery.reports (bool, true) - Forward per-message delivery reports to the |
|
Events() channel. |
|
go.delivery.report.fields (string, "key,value") - Comma separated list of fields to enable for delivery reports. |
|
Allowed values: all, none (or empty string), key, value, headers |
|
Warning: There is a performance penalty to include headers in the delivery report. |
|
go.events.channel.size (int, 1000000) - Events(). |
|
go.produce.channel.size (int, 1000000) - ProduceChannel() buffer size (in number of messages) |
|
go.logs.channel.enable (bool, false) - Forward log to Logs() channel. |
|
go.logs.channel (chan kafka.LogEvent, nil) - Forward logs to application-provided channel instead of Logs(). Requires go.logs.channel.enable=true. |
|
</pre> |
|
<h3 id="Producer.AbortTransaction"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=30707:30769#L900"> |
|
AbortTransaction |
|
</a> |
|
<a class="permalink" href="#Producer.AbortTransaction"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) AbortTransaction(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
AbortTransaction aborts the ongoing transaction. |
|
</p> |
|
<p> |
|
This function should also be used to recover from non-fatal abortable |
|
transaction errors. |
|
</p> |
|
<p> |
|
Any outstanding messages will be purged and fail with |
|
`ErrPurgeInflight` or `ErrPurgeQueue`. |
|
</p> |
|
<p> |
|
Parameters: |
|
</p> |
|
<pre>* `ctx` - The maximum amount of time to block, or nil for indefinite. |
|
</pre> |
|
<p> |
|
Note: This function will block until all outstanding messages are purged |
|
and the transaction abort request has been successfully |
|
handled by the transaction coordinator, or until the `ctx` expires, |
|
which ever comes first. On timeout the application may |
|
call the function again. |
|
</p> |
|
<p> |
|
Note: Will automatically call `Purge()` and `Flush()` to ensure all queued |
|
and in-flight messages are purged before attempting to abort the transaction. |
|
The application MUST serve the `producer.Events()` channel for delivery |
|
reports in a separate go-routine during this time. |
|
</p> |
|
<p> |
|
Returns nil on success or an error object on failure. |
|
Check whether the returned error object permits retrying |
|
by calling `err.(kafka.Error).IsRetriable()`, or whether a fatal error |
|
has been raised by calling `err.(kafka.Error).IsFatal()`. |
|
</p> |
|
<h3 id="Producer.BeginTransaction"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=25048:25091#L763"> |
|
BeginTransaction |
|
</a> |
|
<a class="permalink" href="#Producer.BeginTransaction"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) BeginTransaction() <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
BeginTransaction starts a new transaction. |
|
</p> |
|
<p> |
|
`InitTransactions()` must have been called successfully (once) |
|
before this function is called. |
|
</p> |
|
<p> |
|
Any messages produced, offsets sent (`SendOffsetsToTransaction()`), |
|
etc, after the successful return of this function will be part of |
|
the transaction and committed or aborted atomatically. |
|
</p> |
|
<p> |
|
Finish the transaction by calling `CommitTransaction()` or |
|
abort the transaction by calling `AbortTransaction()`. |
|
</p> |
|
<p> |
|
Returns nil on success or an error object on failure. |
|
Check whether a fatal error has been raised by |
|
calling `err.(kafka.Error).IsFatal()`. |
|
</p> |
|
<p> |
|
Note: With the transactional producer, `Produce()`, et.al, are only |
|
allowed during an on-going transaction, as started with this function. |
|
Any produce call outside an on-going transaction, or for a failed |
|
transaction, will fail. |
|
</p> |
|
<h3 id="Producer.Close"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=10439:10465#L345"> |
|
Close |
|
</a> |
|
<a class="permalink" href="#Producer.Close"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) Close()</pre> |
|
<p> |
|
Close a Producer instance. |
|
The Producer object or its channels are no longer usable after this call. |
|
</p> |
|
<h3 id="Producer.CommitTransaction"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=29291:29354#L864"> |
|
CommitTransaction |
|
</a> |
|
<a class="permalink" href="#Producer.CommitTransaction"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) CommitTransaction(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
CommitTransaction commits the current transaction. |
|
</p> |
|
<p> |
|
Any outstanding messages will be flushed (delivered) before actually |
|
committing the transaction. |
|
</p> |
|
<p> |
|
If any of the outstanding messages fail permanently the current |
|
transaction will enter the abortable error state and this |
|
function will return an abortable error, in this case the application |
|
must call `AbortTransaction()` before attempting a new |
|
transaction with `BeginTransaction()`. |
|
</p> |
|
<p> |
|
Parameters: |
|
</p> |
|
<pre>* `ctx` - The maximum amount of time to block, or nil for indefinite. |
|
</pre> |
|
<p> |
|
Note: This function will block until all outstanding messages are |
|
delivered and the transaction commit request has been successfully |
|
handled by the transaction coordinator, or until the `ctx` expires, |
|
which ever comes first. On timeout the application may |
|
call the function again. |
|
</p> |
|
<p> |
|
Note: Will automatically call `Flush()` to ensure all queued |
|
messages are delivered before attempting to commit the transaction. |
|
The application MUST serve the `producer.Events()` channel for delivery |
|
reports in a separate go-routine during this time. |
|
</p> |
|
<p> |
|
Returns nil on success or an error object on failure. |
|
Check whether the returned error object permits retrying |
|
by calling `err.(kafka.Error).IsRetriable()`, or whether an abortable |
|
or fatal error has been raised by calling |
|
`err.(kafka.Error).TxnRequiresAbort()` or `err.(kafka.Error).IsFatal()` |
|
respectively. |
|
</p> |
|
<h3 id="Producer.Events"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=9069:9107#L300"> |
|
Events |
|
</a> |
|
<a class="permalink" href="#Producer.Events"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) Events() chan <a href="#Event">Event</a></pre> |
|
<p> |
|
Events returns the Events channel (read) |
|
</p> |
|
<h3 id="Producer.Flush"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=9935:9978#L325"> |
|
Flush |
|
</a> |
|
<a class="permalink" href="#Producer.Flush"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) Flush(timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<p> |
|
Flush and wait for outstanding messages and requests to complete delivery. |
|
Includes messages on ProduceChannel. |
|
Runs until value reaches zero or on timeoutMs. |
|
Returns the number of outstanding events still un-flushed. |
|
</p> |
|
<h3 id="Producer.GetFatalError"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=20655:20695#L661"> |
|
GetFatalError |
|
</a> |
|
<a class="permalink" href="#Producer.GetFatalError"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) GetFatalError() <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
GetFatalError returns an Error object if the client instance has raised a fatal error, else nil. |
|
</p> |
|
<h3 id="Producer.GetMetadata"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=19238:19333#L631"> |
|
GetMetadata |
|
</a> |
|
<a class="permalink" href="#Producer.GetMetadata"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) GetMetadata(topic *<a href="https://pkg.go.dev/builtin/#string">string</a>, allTopics <a href="https://pkg.go.dev/builtin/#bool">bool</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (*<a href="#Metadata">Metadata</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
GetMetadata queries broker for cluster and topic metadata. |
|
If topic is non-nil only information about that topic is returned, else if |
|
allTopics is false only information about locally used topics is returned, |
|
else information about all topics is returned. |
|
GetMetadata is equivalent to listTopics, describeTopics and describeCluster in the Java API. |
|
</p> |
|
<h3 id="Producer.InitTransactions"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=23950:24012#L733"> |
|
InitTransactions |
|
</a> |
|
<a class="permalink" href="#Producer.InitTransactions"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) InitTransactions(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
InitTransactions Initializes transactions for the producer instance. |
|
</p> |
|
<p> |
|
This function ensures any transactions initiated by previous instances |
|
of the producer with the same `transactional.id` are completed. |
|
If the previous instance failed with a transaction in progress the |
|
previous transaction will be aborted. |
|
This function needs to be called before any other transactional or |
|
produce functions are called when the `transactional.id` is configured. |
|
</p> |
|
<p> |
|
If the last transaction had begun completion (following transaction commit) |
|
but not yet finished, this function will await the previous transaction's |
|
completion. |
|
</p> |
|
<p> |
|
When any previous transactions have been fenced this function |
|
will acquire the internal producer id and epoch, used in all future |
|
transactional messages issued by this producer instance. |
|
</p> |
|
<p> |
|
Upon successful return from this function the application has to perform at |
|
least one of the following operations within `transaction.timeout.ms` to |
|
avoid timing out the transaction on the broker: |
|
</p> |
|
<pre>* `Produce()` (et.al) |
|
* `SendOffsetsToTransaction()` |
|
* `CommitTransaction()` |
|
* `AbortTransaction()` |
|
</pre> |
|
<p> |
|
Parameters: |
|
</p> |
|
<pre>* `ctx` - The maximum time to block, or nil for indefinite. |
|
On timeout the operation may continue in the background, |
|
depending on state, and it is okay to call `InitTransactions()` |
|
again. |
|
</pre> |
|
<p> |
|
Returns nil on success or an error on failure. |
|
Check whether the returned error object permits retrying |
|
by calling `err.(kafka.Error).IsRetriable()`, or whether a fatal |
|
error has been raised by calling `err.(kafka.Error).IsFatal()`. |
|
</p> |
|
<h3 id="Producer.Len"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=9585:9613#L317"> |
|
Len |
|
</a> |
|
<a class="permalink" href="#Producer.Len"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) Len() <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<p> |
|
Len returns the number of messages and requests waiting to be transmitted to the broker |
|
as well as delivery reports queued for the application. |
|
Includes messages on ProduceChannel. |
|
</p> |
|
<h3 id="Producer.Logs"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=9185:9224#L305"> |
|
Logs |
|
</a> |
|
<a class="permalink" href="#Producer.Logs"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) Logs() chan <a href="#LogEvent">LogEvent</a></pre> |
|
<p> |
|
Logs returns the Log channel (if enabled), else nil |
|
</p> |
|
<h3 id="Producer.OffsetsForTimes"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=20393:20504#L656"> |
|
OffsetsForTimes |
|
</a> |
|
<a class="permalink" href="#Producer.OffsetsForTimes"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) OffsetsForTimes(times []<a href="#TopicPartition">TopicPartition</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (offsets []<a href="#TopicPartition">TopicPartition</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
OffsetsForTimes looks up offsets by timestamp for the given partitions. |
|
</p> |
|
<p> |
|
The returned offset for each partition is the earliest offset whose |
|
timestamp is greater than or equal to the given timestamp in the |
|
corresponding partition. If the provided timestamp exceeds that of the |
|
last message in the partition, a value of -1 will be returned. |
|
</p> |
|
<p> |
|
The timestamps to query are represented as `.Offset` in the `times` |
|
argument and the looked up offsets are represented as `.Offset` in the returned |
|
`offsets` list. |
|
</p> |
|
<p> |
|
The function will block for at most timeoutMs milliseconds. |
|
</p> |
|
<p> |
|
Duplicate Topic+Partitions are not supported. |
|
Per-partition errors may be returned in the `.Error` field. |
|
</p> |
|
<h3 id="Producer.Produce"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=8165:8236#L274"> |
|
Produce |
|
</a> |
|
<a class="permalink" href="#Producer.Produce"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) Produce(msg *<a href="#Message">Message</a>, deliveryChan chan <a href="#Event">Event</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
Produce single message. |
|
This is an asynchronous call that enqueues the message on the internal |
|
transmit queue, thus returning immediately. |
|
The delivery report will be sent on the provided deliveryChan if specified, |
|
or on the Producer object's Events() channel if not. |
|
msg.Timestamp requires librdkafka >= 0.9.4 (else returns ErrNotImplemented), |
|
api.version.request=true, and broker >= 0.10.0.0. |
|
msg.Headers requires librdkafka >= 0.11.4 (else returns ErrNotImplemented), |
|
api.version.request=true, and broker >= 0.11.0.0. |
|
Returns an error if message could not be enqueued. |
|
</p> |
|
<h3 id="Producer.ProduceChannel"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=9315:9364#L310"> |
|
ProduceChannel |
|
</a> |
|
<a class="permalink" href="#Producer.ProduceChannel"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) ProduceChannel() chan *<a href="#Message">Message</a></pre> |
|
<p> |
|
ProduceChannel returns the produce *Message channel (write) |
|
</p> |
|
<h3 id="Producer.Purge"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=12448:12489#L397"> |
|
Purge |
|
</a> |
|
<a class="permalink" href="#Producer.Purge"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) Purge(flags <a href="https://pkg.go.dev/builtin/#int">int</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
Purge messages currently handled by this producer instance. |
|
</p> |
|
<p> |
|
flags is a combination of PurgeQueue, PurgeInFlight and PurgeNonBlocking. |
|
</p> |
|
<p> |
|
The application will need to call Poll(), Flush() or read the Events() channel |
|
after this call to serve delivery reports for the purged messages. |
|
</p> |
|
<p> |
|
Messages purged from internal queues fail with the delivery report |
|
error code set to ErrPurgeQueue, while purged messages that |
|
are in-flight to or from the broker will fail with the error code set to |
|
ErrPurgeInflight. |
|
</p> |
|
<p> |
|
Warning: Purging messages that are in-flight to or from the broker |
|
will ignore any sub-sequent acknowledgement for these messages |
|
received from the broker, effectively making it impossible |
|
for the application to know if the messages were successfully |
|
produced or not. This may result in duplicate messages if the |
|
application retries these messages at a later time. |
|
</p> |
|
<p> |
|
Note: This call may block for a short time while background thread |
|
queues are purged. |
|
</p> |
|
<p> |
|
Returns nil on success, ErrInvalidArg if the purge flags are invalid or unknown. |
|
</p> |
|
<h3 id="Producer.QueryWatermarkOffsets"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=19496:19611#L637"> |
|
QueryWatermarkOffsets |
|
</a> |
|
<a class="permalink" href="#Producer.QueryWatermarkOffsets"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) QueryWatermarkOffsets(topic <a href="https://pkg.go.dev/builtin/#string">string</a>, partition <a href="https://pkg.go.dev/builtin/#int32">int32</a>, timeoutMs <a href="https://pkg.go.dev/builtin/#int">int</a>) (low, high <a href="https://pkg.go.dev/builtin/#int64">int64</a>, err <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
QueryWatermarkOffsets returns the broker's low and high offsets for the given topic |
|
and partition. |
|
</p> |
|
<h3 id="Producer.SendOffsetsToTransaction"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=27154:27291#L808"> |
|
SendOffsetsToTransaction |
|
</a> |
|
<a class="permalink" href="#Producer.SendOffsetsToTransaction"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) SendOffsetsToTransaction(ctx <a href="https://pkg.go.dev/context/">context</a>.<a href="https://pkg.go.dev/context/#Context">Context</a>, offsets []<a href="#TopicPartition">TopicPartition</a>, consumerMetadata *<a href="#ConsumerGroupMetadata">ConsumerGroupMetadata</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SendOffsetsToTransaction sends a list of topic partition offsets to the |
|
consumer group coordinator for `consumerMetadata`, and marks the offsets |
|
as part part of the current transaction. |
|
These offsets will be considered committed only if the transaction is |
|
committed successfully. |
|
</p> |
|
<p> |
|
The offsets should be the next message your application will consume, |
|
i.e., the last processed message's offset + 1 for each partition. |
|
Either track the offsets manually during processing or use |
|
`consumer.Position()` (on the consumer) to get the current offsets for |
|
the partitions assigned to the consumer. |
|
</p> |
|
<p> |
|
Use this method at the end of a consume-transform-produce loop prior |
|
to committing the transaction with `CommitTransaction()`. |
|
</p> |
|
<p> |
|
Parameters: |
|
</p> |
|
<pre>* `ctx` - The maximum amount of time to block, or nil for indefinite. |
|
* `offsets` - List of offsets to commit to the consumer group upon |
|
successful commit of the transaction. Offsets should be |
|
the next message to consume, e.g., last processed message + 1. |
|
* `consumerMetadata` - The current consumer group metadata as returned by |
|
`consumer.GetConsumerGroupMetadata()` on the consumer |
|
instance the provided offsets were consumed from. |
|
</pre> |
|
<p> |
|
Note: The consumer must disable auto commits (set `enable.auto.commit` to false on the consumer). |
|
</p> |
|
<p> |
|
Note: Logical and invalid offsets (e.g., OffsetInvalid) in |
|
`offsets` will be ignored. If there are no valid offsets in |
|
`offsets` the function will return nil and no action will be taken. |
|
</p> |
|
<p> |
|
Returns nil on success or an error object on failure. |
|
Check whether the returned error object permits retrying |
|
by calling `err.(kafka.Error).IsRetriable()`, or whether an abortable |
|
or fatal error has been raised by calling |
|
`err.(kafka.Error).TxnRequiresAbort()` or `err.(kafka.Error).IsFatal()` |
|
respectively. |
|
</p> |
|
<h3 id="Producer.SetOAuthBearerToken"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=21556:21635#L681"> |
|
SetOAuthBearerToken |
|
</a> |
|
<a class="permalink" href="#Producer.SetOAuthBearerToken"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) SetOAuthBearerToken(oauthBearerToken <a href="#OAuthBearerToken">OAuthBearerToken</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SetOAuthBearerToken sets the the data to be transmitted |
|
to a broker during SASL/OAUTHBEARER authentication. It will return nil |
|
on success, otherwise an error if: |
|
1) the token data is invalid (meaning an expiration time in the past |
|
or either a token value or an extension key or value that does not meet |
|
the regular expression requirements as per |
|
<a href="https://tools.ietf.org/html/rfc7628#section-3.1"> |
|
https://tools.ietf.org/html/rfc7628#section-3.1 |
|
</a> |
|
); |
|
2) SASL/OAUTHBEARER is not supported by the underlying librdkafka build; |
|
3) SASL/OAUTHBEARER is supported but is not configured as the client's |
|
authentication mechanism. |
|
</p> |
|
<h3 id="Producer.SetOAuthBearerTokenFailure"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=22134:22200#L692"> |
|
SetOAuthBearerTokenFailure |
|
</a> |
|
<a class="permalink" href="#Producer.SetOAuthBearerTokenFailure"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) SetOAuthBearerTokenFailure(errstr <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<p> |
|
SetOAuthBearerTokenFailure sets the error message describing why token |
|
retrieval/setting failed; it also schedules a new token refresh event for 10 |
|
seconds later so the attempt may be retried. It will return nil on |
|
success, otherwise an error if: |
|
1) SASL/OAUTHBEARER is not supported by the underlying librdkafka build; |
|
2) SASL/OAUTHBEARER is supported but is not configured as the client's |
|
authentication mechanism. |
|
</p> |
|
<h3 id="Producer.String"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=3844:3878#L132"> |
|
String |
|
</a> |
|
<a class="permalink" href="#Producer.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human readable name for a Producer instance |
|
</p> |
|
<h3 id="Producer.TestFatalError"> |
|
func (*Producer) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/producer.go?s=20846:20917#L667"> |
|
TestFatalError |
|
</a> |
|
<a class="permalink" href="#Producer.TestFatalError"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p *<a href="#Producer">Producer</a>) TestFatalError(code <a href="#ErrorCode">ErrorCode</a>, str <a href="https://pkg.go.dev/builtin/#string">string</a>) <a href="#ErrorCode">ErrorCode</a></pre> |
|
<p> |
|
TestFatalError triggers a fatal error in the underlying client. |
|
This is to be used strictly for testing purposes. |
|
</p> |
|
<h2 id="RebalanceCb"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/consumer.go?s=1070:1115#L29"> |
|
RebalanceCb |
|
</a> |
|
<a class="permalink" href="#RebalanceCb"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
RebalanceCb provides a per-Subscribe*() rebalance event callback. |
|
The passed Event will be either AssignedPartitions or RevokedPartitions |
|
</p> |
|
<pre>type RebalanceCb func(*<a href="#Consumer">Consumer</a>, <a href="#Event">Event</a>) <a href="https://pkg.go.dev/builtin/#error">error</a></pre> |
|
<h2 id="ResourcePatternType"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=11534:11562#L327"> |
|
ResourcePatternType |
|
</a> |
|
<a class="permalink" href="#ResourcePatternType"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ResourcePatternType enumerates the different types of Kafka resource patterns. |
|
</p> |
|
<pre>type ResourcePatternType <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="ResourcePatternTypeFromString"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=12662:12751#L349"> |
|
ResourcePatternTypeFromString |
|
</a> |
|
<a class="permalink" href="#ResourcePatternTypeFromString"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func ResourcePatternTypeFromString(patternTypeString <a href="https://pkg.go.dev/builtin/#string">string</a>) (<a href="#ResourcePatternType">ResourcePatternType</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
ResourcePatternTypeFromString translates a resource pattern type name to |
|
a ResourcePatternType value. |
|
</p> |
|
<h3 id="ResourcePatternType.String"> |
|
func (ResourcePatternType) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=12411:12455#L343"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ResourcePatternType.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (t <a href="#ResourcePatternType">ResourcePatternType</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns the human-readable representation of a ResourcePatternType |
|
</p> |
|
<h2 id="ResourceType"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=4179:4200#L129"> |
|
ResourceType |
|
</a> |
|
<a class="permalink" href="#ResourceType"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
ResourceType represents an Apache Kafka resource type |
|
</p> |
|
<pre>type ResourceType <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="ResourceTypeFromString"> |
|
func |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=4955:5023#L151"> |
|
ResourceTypeFromString |
|
</a> |
|
<a class="permalink" href="#ResourceTypeFromString"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func ResourceTypeFromString(typeString <a href="https://pkg.go.dev/builtin/#string">string</a>) (<a href="#ResourceType">ResourceType</a>, <a href="https://pkg.go.dev/builtin/#error">error</a>)</pre> |
|
<p> |
|
ResourceTypeFromString translates a resource type name/string to |
|
a ResourceType value. |
|
</p> |
|
<h3 id="ResourceType.String"> |
|
func (ResourceType) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=4740:4777#L145"> |
|
String |
|
</a> |
|
<a class="permalink" href="#ResourceType.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (t <a href="#ResourceType">ResourceType</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns the human-readable representation of a ResourceType |
|
</p> |
|
<h2 id="RevokedPartitions"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=2803:2865#L100"> |
|
RevokedPartitions |
|
</a> |
|
<a class="permalink" href="#RevokedPartitions"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
RevokedPartitions consumer group rebalance event: revoked partition set |
|
</p> |
|
<pre>type RevokedPartitions struct { |
|
<span id="RevokedPartitions.Partitions"></span> Partitions []<a href="#TopicPartition">TopicPartition</a> |
|
} |
|
</pre> |
|
<h3 id="RevokedPartitions.String"> |
|
func (RevokedPartitions) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=2867:2909#L104"> |
|
String |
|
</a> |
|
<a class="permalink" href="#RevokedPartitions.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#RevokedPartitions">RevokedPartitions</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="Stats"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=2380:2419#L82"> |
|
Stats |
|
</a> |
|
<a class="permalink" href="#Stats"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
Stats statistics event |
|
</p> |
|
<pre>type Stats struct { |
|
<span class="comment">// contains filtered or unexported fields</span> |
|
} |
|
</pre> |
|
<h3 id="Stats.String"> |
|
func (Stats) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/event.go?s=2421:2451#L86"> |
|
String |
|
</a> |
|
<a class="permalink" href="#Stats.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (e <a href="#Stats">Stats</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="TimestampType"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/message.go?s=1324:1346#L38"> |
|
TimestampType |
|
</a> |
|
<a class="permalink" href="#TimestampType"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
TimestampType is a the Message timestamp type or source |
|
</p> |
|
<pre>type TimestampType <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="TimestampType.String"> |
|
func (TimestampType) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/message.go?s=1840:1878#L49"> |
|
String |
|
</a> |
|
<a class="permalink" href="#TimestampType.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (t <a href="#TimestampType">TimestampType</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="TopicMetadata"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/metadata.go?s=1546:1644#L53"> |
|
TopicMetadata |
|
</a> |
|
<a class="permalink" href="#TopicMetadata"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
TopicMetadata contains per-topic metadata |
|
</p> |
|
<pre>type TopicMetadata struct { |
|
<span id="TopicMetadata.Topic"></span> Topic <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="TopicMetadata.Partitions"></span> Partitions []<a href="#PartitionMetadata">PartitionMetadata</a> |
|
<span id="TopicMetadata.Error"></span> Error <a href="#Error">Error</a> |
|
} |
|
</pre> |
|
<h2 id="TopicPartition"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go?s=12721:12841#L267"> |
|
TopicPartition |
|
</a> |
|
<a class="permalink" href="#TopicPartition"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
TopicPartition is a generic placeholder for a Topic+Partition and optionally Offset. |
|
</p> |
|
<pre>type TopicPartition struct { |
|
<span id="TopicPartition.Topic"></span> Topic *<a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="TopicPartition.Partition"></span> Partition <a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
<span id="TopicPartition.Offset"></span> Offset <a href="#Offset">Offset</a> |
|
<span id="TopicPartition.Metadata"></span> Metadata *<a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="TopicPartition.Error"></span> Error <a href="https://pkg.go.dev/builtin/#error">error</a> |
|
} |
|
</pre> |
|
<h3 id="TopicPartition.String"> |
|
func (TopicPartition) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go?s=12843:12882#L275"> |
|
String |
|
</a> |
|
<a class="permalink" href="#TopicPartition.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (p <a href="#TopicPartition">TopicPartition</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<h2 id="TopicPartitions"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go?s=13211:13248#L290"> |
|
TopicPartitions |
|
</a> |
|
<a class="permalink" href="#TopicPartitions"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
TopicPartitions is a slice of TopicPartitions that also implements |
|
the sort interface |
|
</p> |
|
<pre>type TopicPartitions []<a href="#TopicPartition">TopicPartition</a></pre> |
|
<h3 id="TopicPartitions.Len"> |
|
func (TopicPartitions) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go?s=13250:13286#L292"> |
|
Len |
|
</a> |
|
<a class="permalink" href="#TopicPartitions.Len"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (tps <a href="#TopicPartitions">TopicPartitions</a>) Len() <a href="https://pkg.go.dev/builtin/#int">int</a></pre> |
|
<h3 id="TopicPartitions.Less"> |
|
func (TopicPartitions) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go?s=13309:13355#L296"> |
|
Less |
|
</a> |
|
<a class="permalink" href="#TopicPartitions.Less"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (tps <a href="#TopicPartitions">TopicPartitions</a>) Less(i, j <a href="https://pkg.go.dev/builtin/#int">int</a>) <a href="https://pkg.go.dev/builtin/#bool">bool</a></pre> |
|
<h3 id="TopicPartitions.Swap"> |
|
func (TopicPartitions) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/kafka.go?s=13516:13557#L305"> |
|
Swap |
|
</a> |
|
<a class="permalink" href="#TopicPartitions.Swap"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (tps <a href="#TopicPartitions">TopicPartitions</a>) Swap(i, j <a href="https://pkg.go.dev/builtin/#int">int</a>)</pre> |
|
<h2 id="TopicResult"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=2345:2485#L79"> |
|
TopicResult |
|
</a> |
|
<a class="permalink" href="#TopicResult"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
TopicResult provides per-topic operation result (error) information. |
|
</p> |
|
<pre>type TopicResult struct { |
|
<span id="TopicResult.Topic"></span> <span class="comment">// Topic name</span> |
|
Topic <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span id="TopicResult.Error"></span> <span class="comment">// Error, if any, of result. Check with `Error.Code() != ErrNoError`.</span> |
|
Error <a href="#Error">Error</a> |
|
} |
|
</pre> |
|
<h3 id="TopicResult.String"> |
|
func (TopicResult) |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=2555:2591#L87"> |
|
String |
|
</a> |
|
<a class="permalink" href="#TopicResult.String"> |
|
¶ |
|
</a> |
|
</h3> |
|
<pre>func (t <a href="#TopicResult">TopicResult</a>) String() <a href="https://pkg.go.dev/builtin/#string">string</a></pre> |
|
<p> |
|
String returns a human-readable representation of a TopicResult. |
|
</p> |
|
<h2 id="TopicSpecification"> |
|
type |
|
<a href="https://github.com/confluentinc/confluent-kafka-go/blob/v1.9.2/kafka/adminapi.go?s=2835:3426#L96"> |
|
TopicSpecification |
|
</a> |
|
<a class="permalink" href="#TopicSpecification"> |
|
¶ |
|
</a> |
|
</h2> |
|
<p> |
|
TopicSpecification holds parameters for creating a new topic. |
|
TopicSpecification is analogous to NewTopic in the Java Topic Admin API. |
|
</p> |
|
<pre>type TopicSpecification struct { |
|
<span id="TopicSpecification.Topic"></span> <span class="comment">// Topic name to create.</span> |
|
Topic <a href="https://pkg.go.dev/builtin/#string">string</a> |
|
<span class="comment">// Number of partitions in topic.</span> |
|
<span id="TopicSpecification.NumPartitions"></span> NumPartitions <a href="https://pkg.go.dev/builtin/#int">int</a> |
|
<span class="comment">// Default replication factor for the topic's partitions, or zero</span> |
|
<span class="comment">// if an explicit ReplicaAssignment is set.</span> |
|
<span id="TopicSpecification.ReplicationFactor"></span> ReplicationFactor <a href="https://pkg.go.dev/builtin/#int">int</a> |
|
<span class="comment">// (Optional) Explicit replica assignment. The outer array is</span> |
|
<span class="comment">// indexed by the partition number, while the inner per-partition array</span> |
|
<span class="comment">// contains the replica broker ids. The first broker in each</span> |
|
<span class="comment">// broker id list will be the preferred replica.</span> |
|
<span id="TopicSpecification.ReplicaAssignment"></span> ReplicaAssignment [][]<a href="https://pkg.go.dev/builtin/#int32">int32</a> |
|
<span class="comment">// Topic configuration.</span> |
|
<span id="TopicSpecification.Config"></span> Config map[<a href="https://pkg.go.dev/builtin/#string">string</a>]<a href="https://pkg.go.dev/builtin/#string">string</a> |
|
} |
|
</pre> |
|
<div id="footer"> |
|
Build version go1.14. |
|
<br/> |
|
Except as |
|
<a href="https://developers.google.com/site-policies#restrictions"> |
|
noted |
|
</a> |
|
, |
|
the content of this page is licensed under the |
|
Creative Commons Attribution 3.0 License, |
|
and code is licensed under a |
|
<a href="https://go.dev/LICENSE"> |
|
BSD license |
|
</a> |
|
. |
|
<br/> |
|
<a href="https://golang.org/doc/tos.html"> |
|
Terms of Service |
|
</a> |
|
| |
|
<a href="https://www.google.com/intl/en/policies/privacy/"> |
|
Privacy Policy |
|
</a> |
|
</div> |
|
</div> |
|
<!-- .container --> |
|
</div> |
|
<!-- #page --> |
|
</body> |
|
</html> |
|
|
|
|