package kafka

  1. Overview
  2. Docs

Module KafkaSource

Sourcetype handler
Sourcetype topic
Sourcetype queue
Sourcetype partition = int
Sourcetype offset = int64
Sourcetype message =
  1. | Message of topic * partition * offset * string * string option
  2. | PartitionEnd of topic * partition * offset
Sourcetype msg_id = int
Sourcetype error =
  1. | BAD_MSG
  2. | BAD_COMPRESSION
  3. | DESTROY
  4. | FAIL
  5. | TRANSPORT
  6. | CRIT_SYS_RESOURCE
  7. | RESOLVE
  8. | MSG_TIMED_OUT
  9. | UNKNOWN_PARTITION
  10. | FS
  11. | UNKNOWN_TOPIC
  12. | ALL_BROKERS_DOWN
  13. | INVALID_ARG
  14. | TIMED_OUT
  15. | QUEUE_FULL
  16. | ISR_INSUFF
  17. | UNKNOWN
  18. | OFFSET_OUT_OF_RANGE
  19. | INVALID_MSG
  20. | UNKNOWN_TOPIC_OR_PART
  21. | INVALID_MSG_SIZE
  22. | LEADER_NOT_AVAILABLE
  23. | NOT_LEADER_FOR_PARTITION
  24. | REQUEST_TIMED_OUT
  25. | BROKER_NOT_AVAILABLE
  26. | REPLICA_NOT_AVAILABLE
  27. | MSG_SIZE_TOO_LARGE
  28. | STALE_CTRL_EPOCH
  29. | OFFSET_METADATA_TOO_LARGE
  30. | CONF_UNKNOWN
  31. | CONF_INVALID
Sourceexception Error of error * string
Sourceval new_consumer : (string * string) list -> handler
Sourceval new_producer : ?delivery_callback:(msg_id -> error option -> unit) -> (string * string) list -> handler
Sourceval destroy_handler : handler -> unit
Sourceval handler_name : handler -> string
Sourceval new_topic : ?partitioner_callback:(int -> string -> partition) -> handler -> string -> (string * string) list -> topic
Sourceval destroy_topic : topic -> unit
Sourceval topic_name : topic -> string
Sourceval produce : topic -> partition -> ?key:string -> ?msg_id:msg_id -> string -> unit
Sourceval partition_unassigned : partition
Sourceval outq_len : handler -> int
Sourceval poll_events : ?timeout_ms:int -> handler -> int
Sourceval wait_delivery : ?timeout_ms:int -> ?max_outq_len:int -> handler -> unit

Wait that messages are delivered (waiting that less than max_outq_len messages are pending).

Sourceval consume_start : topic -> partition -> offset -> unit
Sourceval offset_beginning : offset
Sourceval offset_end : offset
Sourceval offset_stored : offset
Sourceval offset_tail : int -> offset
Sourceval consume_stop : topic -> partition -> unit
Sourceval consume : ?timeout_ms:int -> topic -> partition -> message
Sourceval consume_batch : ?timeout_ms:int -> ?msg_count:int -> topic -> partition -> message list
Sourceval new_queue : handler -> queue
Sourceval destroy_queue : queue -> unit
Sourceval consume_start_queue : queue -> topic -> partition -> offset -> unit
Sourceval consume_queue : ?timeout_ms:int -> queue -> message
Sourceval consume_batch_queue : ?timeout_ms:int -> ?msg_count:int -> queue -> message list
Sourceval store_offset : topic -> partition -> offset -> unit
Sourcemodule Metadata : sig ... end
Sourceval topic_metadata : ?timeout_ms:int -> handler -> topic -> Metadata.topic_metadata
Sourceval local_topics_metadata : ?timeout_ms:int -> handler -> Metadata.topic_metadata list
Sourceval all_topics_metadata : ?timeout_ms:int -> handler -> Metadata.topic_metadata list
OCaml

Innovation. Community. Security.