Convert clojure data structures to java objects.
Convert clojure data structures to java objects.
(access-control-entry {:as args
:keys [principal host permission operation]
:or {host "*" operation :all permission-type :any}})
(access-control-entry principal host permission operation)
@ args {:principal
:host (nilable) The host name where "*" involves all hosts.
:permission (nilable)
Cf. acl-permission-type
:operation (nilable)
Cf. acl-operation
}
=> org.apache.kafka.common.acl.AccessControlEntry
@ args {:principal :host (nilable) The host name where "*" involves all hosts. :permission (nilable) Cf. `acl-permission-type` :operation (nilable) Cf. `acl-operation`} => org.apache.kafka.common.acl.AccessControlEntry
(access-control-entry-filter)
(access-control-entry-filter {:as args
:keys [principal host permission operation]
:or
{host "*" operation :all permission-type :any}})
(access-control-entry-filter principal host permission operation)
@ args (nilable) {:principal (nilable)
:host (nilable) The host name where "*" involves any host.
:permission (nilable)
Cf. acl-permission-type
:operation (nilable)
Cf. acl-operation
}
=> org.apache.kafka.common.acl.AccessControlEntryFilter
Ex. (access-control-entry-filter {:permission :allow :operation :create})
@ args (nilable) {:principal (nilable) :host (nilable) The host name where "*" involves any host. :permission (nilable) Cf. `acl-permission-type` :operation (nilable) Cf. `acl-operation`} => org.apache.kafka.common.acl.AccessControlEntryFilter Ex. (access-control-entry-filter {:permission :allow :operation :create})
(acl-binding {:as args :keys [resource access-control]})
(acl-binding resource access-control)
@ args
{:resource
Cf. resource
:access-control
Cf. access-control-entry
}
=> org.apache.kafka.common.acl.AclBinding
@ args {:resource Cf. `resource` :access-control Cf. `access-control-entry`} => org.apache.kafka.common.acl.AclBinding
(acl-binding-filter)
(acl-binding-filter {:as args :keys [resource access-control]})
(acl-binding-filter resource access-control)
@ args (nilable)
{:resource (nilable)
Cf. resource-filter
:access-control (nilable)
Cf. access-control-entry-filter
}
=> org.apache.kafka.common.acl.AclBindingFilter
Ex. (acl-binding-filter {:resource {:name "my-topic" :type :topic} :access-control {:permission :allow :operation :alter}})
@ args (nilable) {:resource (nilable) Cf. `resource-filter` :access-control (nilable) Cf. `access-control-entry-filter`} => org.apache.kafka.common.acl.AclBindingFilter Ex. (acl-binding-filter {:resource {:name "my-topic" :type :topic} :access-control {:permission :allow :operation :alter}})
(acl-operation kw)
@ kw (nilable) One of :all or nil :alter :alter-config :any :cluster-action :create :delete :describe :describe-configs :idempotent-write :read :unknown :write
=> org.apache.kafka.common.acl.AclOperation
@ kw (nilable) One of :all or nil :alter :alter-config :any :cluster-action :create :delete :describe :describe-configs :idempotent-write :read :unknown :write => org.apache.kafka.common.acl.AclOperation
(acl-permission-type kw)
@ kw (nilable) One of :any or nil :allow :deny :unknown
=> org.apache.kafka.common.acl.AclPermissionType
@ kw (nilable) One of :any or nil :allow :deny :unknown => org.apache.kafka.common.acl.AclPermissionType
(alter-configs configs)
@ configs A map of configurations organized by names and types.
=> Map of resource type to map of resource name to configuration.
Cf. config-resource$type
Ex. (alter-configs {:brokers {"0" {:delete.topic.enable true}} :topics {"my-topic" {:cleanup.policy "compact"}}})
@ configs A map of configurations organized by names and types. => Map of resource type to map of resource name to configuration. Cf. `config-resource$type` Ex. (alter-configs {:brokers {"0" {:delete.topic.enable true}} :topics {"my-topic" {:cleanup.policy "compact"}}})
(alter-configs-options {:as args :keys [timeout-ms fake?] :or {fake? false}})
(alter-configs-options timeout-ms fake?)
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.
:fake (nilable) Validate request without actually creating the topic for real ?}
=> org.apache.kafka.clients.admin.AlterConfigsOptions
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout. :fake (nilable) Validate request without actually creating the topic for real ?} => org.apache.kafka.clients.admin.AlterConfigsOptions
(at-least-0 n)
Converts a number n
(nilable) to a positive int, a negative value resulting in 0.
Converts a number `n` (nilable) to a positive int, a negative value resulting in 0.
(callback f)
@ f Fn taking an exception and a map representing metadata about the record that has been sent. Only one of them will be non-nil. Cf. `milena.interop.clj/record-metadata
=> org.apache.kafka.clients.producer.Callback
Ex. (callback (fn [exception meta] (when-not exception (println :committed meta))))
@ f Fn taking an exception and a map representing metadata about the record that has been sent. Only one of them will be non-nil. Cf. `milena.interop.clj/record-metadata => org.apache.kafka.clients.producer.Callback Ex. (callback (fn [exception meta] (when-not exception (println :committed meta))))
(config entries)
@ entries
List of configuration entries.
Cf. config-entry
=> org.apache.kafka.clients.admin.Config
@ entries List of configuration entries. Cf. `config-entry` => org.apache.kafka.clients.admin.Config
(config-entry [kw value])
(config-entry kw value)
@ kw Name.
@ value Stringifyable value.
=> org.apache.kafka.clients.admin.ConfigEntry
@ kw Name. @ value Stringifyable value. => org.apache.kafka.clients.admin.ConfigEntry
(config-resource name)
(config-resource name type)
@ name Resource name
@ type (nilable)
Resource type.
Cf. config-resource$type
=> org.apache.kafka.common.config.ConfigResource
Ex. (config-resource "my-topic" :topic)
@ name Resource name @ type (nilable) Resource type. Cf. `config-resource$type` => org.apache.kafka.common.config.ConfigResource Ex. (config-resource "my-topic" :topic)
(config-resource$type)
(config-resource$type kw)
@ kw One of :unknown or nil :brokers :topics
=> org.apache.kafka.common.config.ConfigResource$Type
@ kw One of :unknown or nil :brokers :topics => org.apache.kafka.common.config.ConfigResource$Type
(config-resources resources)
@ resources
A map of resource type to a list of resource names.
Cf. config-resource$type
=> A list for org.apache.kafka.common.config.ConfigResource
Ex. (config-resources {:topics #{"some-topic" "another-topic"} :brokers #{"0" "1"}})
@ resources A map of resource type to a list of resource names. Cf. `config-resource$type` => A list for org.apache.kafka.common.config.ConfigResource Ex. (config-resources {:topics #{"some-topic" "another-topic"} :brokers #{"0" "1"}})
(consumer-rebalance-listener f)
@ f
Fn taking assigned?
and a list of [topic partition].
+ assigned?
Are these topic-partitions assigned or revoked ?
Cf. milena.interop.clj/topic-partition
=> org.apache.kafka.clients.consumer.ConsumerRebalanceListener
@ f Fn taking `assigned?` and a list of [topic partition]. + assigned? Are these topic-partitions assigned or revoked ? Cf. `milena.interop.clj/topic-partition` => org.apache.kafka.clients.consumer.ConsumerRebalanceListener
(create-acls-options {:as args :keys [timeout-ms]})
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.}
=> org.apache.kafka.clients.admin.CreateAclsOptions
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.} => org.apache.kafka.clients.admin.CreateAclsOptions
(create-partitions-options)
(create-partitions-options {:as args :keys [fake?]})
Options for milena.admin/partitions-create
.
@ args (nilable) {:fake (nilable) Validate request without actually creating the topic for real ?}
=> org.apache.kafka.clients.admin.CreatePartitionsOptions
Options for `milena.admin/partitions-create`. @ args (nilable) {:fake (nilable) Validate request without actually creating the topic for real ?} => org.apache.kafka.clients.admin.CreatePartitionsOptions
(create-topics-options {:as args :keys [timeout-ms fake?]})
(create-topics-options timeout-ms fake?)
Options for milena.admin/topics-create
.
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.
:fake (nilable) Validate request without actually creating the topic for real ?}
=> org.apache.kafka.clients.admin.CreateTopicsOptions
Options for `milena.admin/topics-create`. @ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout. :fake (nilable) Validate request without actually creating the topic for real ?} => org.apache.kafka.clients.admin.CreateTopicsOptions
(delete-acls-options {:as args :keys [timeout-ms]})
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.}
=> org.apache.kafka.clients.admin.DeleteAclsOptions
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.} => org.apache.kafka.clients.admin.DeleteAclsOptions
(delete-topics-options {:as args :keys [timeout-ms]})
Options for milena.admin/topics-delete
.
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.}
=> org.apache.kafka.clients.admin.DeleteTopicsOptions
Options for `milena.admin/topics-delete`. @ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.} => org.apache.kafka.clients.admin.DeleteTopicsOptions
(describe-acls-options {:as args :keys [timeout-ms]})
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.}
=> org.apache.kafka.clients.admin.DescribeAclsOptions
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.} => org.apache.kafka.clients.admin.DescribeAclsOptions
(describe-cluster-options {:as args :keys [timeout-ms]})
Options for milena.admin/cluster
.
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.}
=> org.apache.kafka.clients.admin.DescribeClusterOptions object
Options for `milena.admin/cluster`. @ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.} => org.apache.kafka.clients.admin.DescribeClusterOptions object
(describe-configs-options {:as args :keys [timeout-ms]})
Options for milena.admin/config
.
@ args {:timeout-ms An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.}
=> org.apache.kafka.clients.admin.DescribeConfigsOptions
Options for `milena.admin/config`. @ args {:timeout-ms An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.} => org.apache.kafka.clients.admin.DescribeConfigsOptions
(describe-topics-options {:as args :keys [timeout-ms]})
Options for milena.admin/topics-decribe
.
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.}
=> org.apache.kafka.clients.admin.DescribeTopicsOptions object
Options for `milena.admin/topics-decribe`. @ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.} => org.apache.kafka.clients.admin.DescribeTopicsOptions object
(joined {:as opts
:keys [serializer serializer-key serializer-value serializer-value-left
serializer-value-right deserializer deserializer-key
deserializer-value deserializer-value-left
deserializer-value-right]})
(list-topics-options
{:as args :keys [timeout-ms internal?] :or {internal? false}})
(list-topics-options timeout-ms internal?)
Options for milena.admin/topics
.
@ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout.
:internal? Should internal topics be retrieved ?}
=> org.apache.kafka.clients.admin.ListTopicsOptions object
Options for `milena.admin/topics`. @ args (nilable) {:timeout-ms (nilable) An optional timeout in milliseconds, futures will throw a org.apache.kafka.common.errors.TimeoutException if the values couldn't be retrieved within this timeout. :internal? Should internal topics be retrieved ?} => org.apache.kafka.clients.admin.ListTopicsOptions object
(new-partitions {:as arg :keys [n assignments]})
For increasing the number of partitions.
@ arg {:n New number of partitions.
:assignments Matrix of 'number of new partitions' x 'replication factor' where each entry is a broker number and the first one is the prefered leader.
Ex. For 3 new partitions and a replication factor of 2 :
[[1 2]
[2 3]
[3 1]]
}
=> org.apache.kafka.clients.admin.NewPartitions
For increasing the number of partitions. @ arg {:n New number of partitions. :assignments Matrix of 'number of new partitions' x 'replication factor' where each entry is a broker number and the first one is the prefered leader. Ex. For 3 new partitions and a replication factor of 2 : [[1 2] [2 3] [3 1]] } => org.apache.kafka.clients.admin.NewPartitions
(new-topic topic
{:as args
:keys [partitions replication-factor assignments config]
:or {partitions 1 replication-factor 1}})
For creating new topics via milena.admin/topics-create
.
A topic can be created either by specifying the number of partitions and the replication factor, either by specyfying directly the assignments.
@ topic The topic name
@ args (nilable) {:partitions (nilable) The number of partition for this new topic
:replication-factor (nilable) The replication factor for each partition
:assigments (nilable) A map of partition number -> list of replica ids (i.e. broker ids).
Although not enforced, it is generally a good idea for all partitions to have
the same number of replicas.
:config (nilable) Kafka configuration
Cf. https://kafka.apache.org/documentation/#topicconfigs}
=> org.apache.kafka.clients.admin.NewTopic object
Ex. (new-topic "topic-name" {:partitions 4 :replication-facor 3})
For creating new topics via `milena.admin/topics-create`. A topic can be created either by specifying the number of partitions and the replication factor, either by specyfying directly the assignments. @ topic The topic name @ args (nilable) {:partitions (nilable) The number of partition for this new topic :replication-factor (nilable) The replication factor for each partition :assigments (nilable) A map of partition number -> list of replica ids (i.e. broker ids). Although not enforced, it is generally a good idea for all partitions to have the same number of replicas. :config (nilable) Kafka configuration Cf. https://kafka.apache.org/documentation/#topicconfigs} => org.apache.kafka.clients.admin.NewTopic object Ex. (new-topic "topic-name" {:partitions 4 :replication-facor 3})
(offset-commit-callback f)
@ f
Fn taking exception
and offsets
, one of them being nil depending whether an error occured or not.
offsets
(nilable)
Map of [topic partition] to offsets.=> org.apache.kafka.clients.consumer.OffsetCommitCallback
@ f Fn taking `exception` and `offsets`, one of them being nil depending whether an error occured or not. + `offsets` (nilable) Map of [topic partition] to offsets. => org.apache.kafka.clients.consumer.OffsetCommitCallback
(producer-record {:as record :keys [topic partition key value timestamp]})
@ record {:topic Topic name.
:partition (nilable) Optional partition number.
:key (nilable) Optional key.
:value (nilable) Optional value.
:timestamp (nilable) Optional unix timestamp.
=> org.apache.kafka.clients.producer.ProducerRecord
Ex. (producer-record {:topic "my-topic" :key "some-key" :value 42})
@ record {:topic Topic name. :partition (nilable) Optional partition number. :key (nilable) Optional key. :value (nilable) Optional value. :timestamp (nilable) Optional unix timestamp. => org.apache.kafka.clients.producer.ProducerRecord Ex. (producer-record {:topic "my-topic" :key "some-key" :value 42})
(resource {:as args :keys [name type]})
(resource name type)
@ args (nilable) {:name Resource name.
:type (nilable)
Cf. resource-type
}
=> org.apache.kafka.common.resource.Resource
Ex. (resource {:name "my-topic" :?type :topic})
@ args (nilable) {:name Resource name. :type (nilable) Cf. `resource-type`} => org.apache.kafka.common.resource.Resource Ex. (resource {:name "my-topic" :?type :topic})
(resource-filter)
(resource-filter {:as ?args :keys [?name ?type]})
(resource-filter ?name ?type)
@ args (nilable) {:name (nilable) Resource name.
:type (nilable)
Resource type.
Cf. resource-type
}
=> org.apache.kafka.common.resource.ResourceFilter
Ex. (resource-filter)
(resource-filter {:name "my-topic"
:type :topic})
@ args (nilable) {:name (nilable) Resource name. :type (nilable) Resource type. Cf. `resource-type`} => org.apache.kafka.common.resource.ResourceFilter Ex. (resource-filter) (resource-filter {:name "my-topic" :type :topic})
(resource-type)
(resource-type kw)
@ kw (nilable) One of :any or nil :cluster :groupc :topic :transactional-id :unknown
=> org.apache.kafka.common.resource.ResourceType
@ kw (nilable) One of :any or nil :cluster :groupc :topic :transactional-id :unknown => org.apache.kafka.common.resource.ResourceType
(serde-key {:as opts
:keys [serializer serializer-key deserializer deserializer-key]})
(serde-value {:as opts
:keys [serializer serializer-value deserializer
deserializer-value]})
(store-builder--ws {:as opts :keys [name retention segments size duplicates?]})
(streams-config
application-name
{:as opts :keys [nodes config] :or {nodes [["localhost" 9092]]}})
(topic-partition [topic partition])
(topic-partition topic partition)
@ topic Topic name.
@ partition Partition number.
=> org.apache.kafka.common.TopicPartition
Ex. (topic-partition ["my-topic" 0])
(topic-partition "my-topic"
0)
@ topic Topic name. @ partition Partition number. => org.apache.kafka.common.TopicPartition Ex. (topic-partition ["my-topic" 0]) (topic-partition "my-topic" 0)
(topic-partition-to-offset tp->o)
@ tp->o Map of [topic partition] to offsets.
=> Map of org.apache.kafka.common.TopicPartition to org.apache.kafka.clients.consumer.OffsetAndMetadata.
@ tp->o Map of [topic partition] to offsets. => Map of org.apache.kafka.common.TopicPartition to org.apache.kafka.clients.consumer.OffsetAndMetadata.
(topics-to-new-partitions hmap)
@ hmap
Map of topic name to new partitions.
Cf. new-partitions
=> Map of topic name to org.apache.kafka.clients.admin.NewPartitions
@ hmap Map of topic name to new partitions. Cf. `new-partitions` => Map of topic name to org.apache.kafka.clients.admin.NewPartitions
(value-transformer {init' :init transform' :transform close' :close})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close