Skip Menu |

This queue is for tickets about the Kafka CPAN distribution.

Report information
The Basics
Id: 101590
Status: resolved
Priority: 0/
Queue: Kafka

People
Owner: SGLADKOV [...] cpan.org
Requestors: harisekhon [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.8009_1



Subject: Kafka Send/Receive Max Retries doesn't allow 0 retries
Date: Sat, 17 Jan 2015 18:39:38 +0000
To: bug-Kafka [...] rt.cpan.org
From: Hari Sekhon <harisekhon [...] gmail.com>
Hi, When using the Kafka Perl API the SEND_MAX_RETRIES and RECEIVE_MAX_RETRIES arguments to the Kafka::Connection->new() call don't seem to allow 0 as a valid value. I am writing code to detect any faults in Kafka brokers and would like to know if there is any failure at all so need to set retries to zero, but this results in Error: Invalid argument: SEND_MAX_RETRIES or Error: Invalid argument: RECEIVE_MAX_RETRIES This forces me to do at least 1 retry which is not optimal for the purposes of detecting any faults. I suspect underneath this is doing some logic like $var or die; where zero will fail the boolean condition. If so could the test instead be made to do defined($var) and $var =~ /^\d+$/ and $var >= 0 so that I can implement the zero retries behaviour in my program? Best Regards, Hari Sekhon http://www.linkedin.com/in/harisekhon
Hi, We have prepared a new version 0.8009_1 . CHANGES: - $RECEIVE_MAX_RETRIES, $SEND_MAX_RETRIES renamed to $RECEIVE_MAX_ATTEMPTS, $SEND_MAX_ATTEMPTS . Very grateful for your attention and valuable comments! Best Regards, Sergey Gladkov