NAME
Kafka::Internals - Constants and functions used internally.
VERSION
This documentation refers to Kafka::Internals
version 0.800_2 .
SYNOPSIS
use 5.010;
use strict;
use warnings;
use Kafka::Internals qw(
$MAX_SOCKET_REQUEST_BYTES
);
my $bin_stream_size = $MAX_SOCKET_REQUEST_BYTES;
DESCRIPTION
This module is not a user module.
In order to achieve better performance, functions of this module do not perform arguments validation.
EXPORT
The following constants are available for export
$DEFAULT_RAISE_ERROR
Default value for RaiseError
, meaning to not drop exception.
$APIKEY_PRODUCE
The numeric code that the ApiKey in the request take for the ProduceRequest
request type.
$APIKEY_FETCH
The numeric code that the ApiKey in the request take for the FetchRequest
request type.
$APIKEY_OFFSET
The numeric code that the ApiKey in the request take for the OffsetRequest
request type.
$APIKEY_METADATA
The numeric code that the ApiKey in the request take for the MetadataRequest
request type.
$MAX_SOCKET_REQUEST_BYTES
The maximum number of bytes in a socket request.
The maximum size of a request that the socket server will accept. Default limit (as configured in server.properties) is 104857600.
$PRODUCER_ANY_OFFSET
RTFM: When the producer is sending messages it doesn't actually know the offset and can fill in any value here it likes.
$MAX_CORRELATIONID
Largest positive integer on 32-bit machines
FUNCTIONS
The following functions are available for Kafka::Internals
module.
last_errorcode
This method returns an error code that specifies the description in the %Kafka::ERROR
hash. Analysing this information can be done to determine the cause of the error.
last_error
This method returns an error message that contains information about the encountered failure. Messages may contain additional details and do not coincide completely with the %Kafka::ERROR
hash.
RaiseError
This method returns a value of the mode responding to the error.
RaiseError
leads set an internal attribute describing the error, when an error is detected if RaiseError
set to false, or to die automatically if RaiseError
set to true (this can always be trapped with eval
).
Code and a description of the error can be obtained by calling the methods "last_errorcode" and "last_error" respectively.
You should always check for errors, when "RaiseError" is not true.
SEE ALSO
The basic operation of the Kafka package modules:
Kafka - constants and messages used by the Kafka package modules.
Kafka::Connection - interface to connect to a Kafka cluster.
Kafka::Producer - interface for producing client.
Kafka::Consumer - interface for consuming client.
Kafka::Message - interface to access Kafka message properties.
Kafka::Int64 - functions to work with 64 bit elements of the protocol on 32 bit systems.
Kafka::Protocol - functions to process messages in the Apache Kafka's Protocol.
Kafka::IO - low level interface for communication with Kafka server.
Kafka::Internals - Internal constants and functions used by several package modules.
A wealth of detail about the Apache Kafka and the Kafka Protocol:
Main page at http://kafka.apache.org/
Kafka Protocol at https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol
AUTHOR
Sergey Gladkov, <sgladkov@trackingsoft.com>
CONTRIBUTORS
Alexander Solovey
Jeremy Jordan
Vlad Marchenko
COPYRIGHT AND LICENSE
Copyright (C) 2012-2013 by TrackingSoft LLC.
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic at http://dev.perl.org/licenses/artistic.html.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.