Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

RD_KAFKA_CONSUMER (integer)
RD_KAFKA_OFFSET_BEGINNING (integer)
Start consuming from beginning of kafka partition queue: oldest msg.
RD_KAFKA_OFFSET_END (integer)
Start consuming from end of kafka partition queue: next msg.
RD_KAFKA_OFFSET_STORED (integer)
Start consuming from offset retrieved from offset store.
RD_KAFKA_PARTITION_UA (integer)
The unassigned partition is used by the producer API for messages that should be partitioned using the configured or default partitioner.
RD_KAFKA_PRODUCER (integer)
RD_KAFKA_VERSION (integer)
RD_KAFKA_RESP_ERR__BEGIN (integer)
RD_KAFKA_RESP_ERR__BAD_MSG (integer)
Local: Bad message format
RD_KAFKA_RESP_ERR__BAD_COMPRESSION (integer)
Local: Invalid compressed data
RD_KAFKA_RESP_ERR__DESTROY (integer)
Local: Broker handle destroyed
RD_KAFKA_RESP_ERR__FAIL (integer)
Local: Communication failure with broker
RD_KAFKA_RESP_ERR__TRANSPORT (integer)
Local: Broker transport failure
RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE (integer)
Local: Critical system resource failure
RD_KAFKA_RESP_ERR__RESOLVE (integer)
Local: Host resolution failure
RD_KAFKA_RESP_ERR__MSG_TIMED_OUT (integer)
Local: Message timed out
RD_KAFKA_RESP_ERR__PARTITION_EOF (integer)
Broker: No more messages
RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION (integer)
Local: Unknown partition
RD_KAFKA_RESP_ERR__FS (integer)
Local: File or filesystem error
RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC (integer)
Local: Unknown topic
RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN (integer)
Local: All broker connections are down
RD_KAFKA_RESP_ERR__INVALID_ARG (integer)
Local: Invalid argument or configuration
RD_KAFKA_RESP_ERR__TIMED_OUT (integer)
Local: Timed out
RD_KAFKA_RESP_ERR__QUEUE_FULL (integer)
Local: Queue full
RD_KAFKA_RESP_ERR__ISR_INSUFF (integer)
Local: ISR count insufficient
RD_KAFKA_RESP_ERR__NODE_UPDATE (integer)
Local: Broker node update
RD_KAFKA_RESP_ERR__SSL (integer)
Local: SSL error
RD_KAFKA_RESP_ERR__WAIT_COORD (integer)
Local: Waiting for coordinator
RD_KAFKA_RESP_ERR__UNKNOWN_GROUP (integer)
Local: Unknown group
RD_KAFKA_RESP_ERR__IN_PROGRESS (integer)
Local: Operation in progress
RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS (integer)
Local: Previous operation in progress
RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION (integer)
Local: Existing subscription
RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS (integer)
Local: Assign partitions
RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS (integer)
Local: Revoke partitions
RD_KAFKA_RESP_ERR__CONFLICT (integer)
Local: Conflicting use
RD_KAFKA_RESP_ERR__STATE (integer)
Local: Erroneous state
RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL (integer)
Local: Unknown protocol
RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED (integer)
Local: Not implemented
RD_KAFKA_RESP_ERR__AUTHENTICATION (integer)
Local: Authentication failure
RD_KAFKA_RESP_ERR__NO_OFFSET (integer)
Local: No offset stored
RD_KAFKA_RESP_ERR__END (integer)
RD_KAFKA_RESP_ERR_UNKNOWN (integer)
Unknown broker error
RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE (integer)
Broker: Offset out of range
RD_KAFKA_RESP_ERR_INVALID_MSG (integer)
Broker: Invalid message
RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART (integer)
Broker: Unknown topic or partition
RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE (integer)
Broker: Invalid message size
RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE (integer)
Broker: Leader not available
RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION (integer)
Broker: Not leader for partition
RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT (integer)
Broker: Request timed out
RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE (integer)
Broker: Broker not available
RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE (integer)
Broker: Replica not available
RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE (integer)
Broker: Message size too large
RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH (integer)
Broker: StaleControllerEpochCode
RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE (integer)
Broker: Offset metadata string too large
RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION (integer)
Broker: Broker disconnected before response received
RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS (integer)
Broker: Group coordinator load in progress
RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE (integer)
Broker: Group coordinator not available
RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP (integer)
Broker: Not coordinator for group
RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION (integer)
Broker: Invalid topic
RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE (integer)
Broker: Message batch larger than configured server segment size
RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS (integer)
Broker: Not enough in-sync replicas
RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND (integer)
Broker: Message(s) written to insufficient number of in-sync replicas
RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS (integer)
Broker: Invalid required acks value
RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION (integer)
Broker: Specified group generation id is not valid
RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL (integer)
Broker: Inconsistent group protocol
RD_KAFKA_RESP_ERR_INVALID_GROUP_ID (integer)
Broker: Invalid group.id
RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID (integer)
Broker: Unknown member
RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT (integer)
Broker: Invalid session timeout
RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS (integer)
Broker: Group rebalance in progress
RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE (integer)
Broker: Commit offset data size is not valid
RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED (integer)
Broker: Topic authorization failed
RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED (integer)
Broker: Group authorization failed
RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED (integer)
Broker: Cluster authorization failed
RD_KAFKA_CONF_UNKNOWN (integer)
RD_KAFKA_CONF_INVALID (integer)
RD_KAFKA_CONF_OK (integer)
RD_KAFKA_MSG_PARTITIONER_RANDOM (integer)
The random partitioner. This was the default partitioner in librdkafka 0.8. Assigns partition randomly.
RD_KAFKA_MSG_PARTITIONER_CONSISTENT (integer)
The consistent partitioner. Uses consistent hashing to map identical keys onto identical partitions. Uses CRC32 as hashing function. Messages with no key or empty key are always assigned to the same partition.
RD_KAFKA_MSG_PARTITIONER_CONSISTENT_RANDOM (integer)
The consistent random partitioner. Uses consistent hashing to map identical keys onto identical partitions. Uses CRC32 as hashing function. Messages with no key or empty key are randomly partitioned.
RD_KAFKA_MSG_PARTITIONER_MURMUR2 (integer)
The murmur2 partitioner. Uses consistent hashing to map identical keys onto identical partitions. Uses Java Producer compatible Murmur2 as hashing function. Messages with no key or empty key are always assigned to the same partition.
RD_KAFKA_MSG_PARTITIONER_MURMUR2_RANDOM (integer)
The murmur2 random partitioner. Uses consistent hashing to map identical keys onto identical partitions. Uses Java Producer compatible Murmur2 as hashing function. Messages with no key or empty key are randomly partitioned.
RD_KAFKA_LOG_PRINT (integer)
The print logger. Prints messages to stderr.
RD_KAFKA_LOG_SYSLOG (integer)
The syslog logger. Sends messages to syslog.
RD_KAFKA_LOG_SYSLOG_PRINT (integer)
The syslog-print partitioner. Sends messages to syslog and prints them to stderr.
RD_KAFKA_PURGE_F_QUEUE (integer)
Purge messages in internal queues.
RD_KAFKA_PURGE_F_INFLIGHT (integer)
Purge messages in-flight to or from the broker.
RD_KAFKA_PURGE_F_NON_BLOCKING (integer)
Don't wait for background thread queue purging to finish.
RD_KAFKA_MSG_F_BLOCK (integer)
Available from rdkafka 3.1.3, will block produce*() on message queue full.