Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested fix for issue #7: Kafka::consume exits if set_partition was not called #8

Closed
wants to merge 25 commits into from

Conversation

EVODelavega
Copy link

  • Added a partition property to the Kafka class
  • Set partition when Kafka::consume is called without calling set_partition first
  • Fixed format string used to write to syslog (%d of int64_t -> PRId64, %d for char *offset -> %s)
  • Updated the READEME.md
  • Check argument value passed to Kafka::set_partition -> throws exception in case of an invalid argument
  • Reduce wait in kafka_destroy to 10ms
  • Add checks to return value of msg_consume, only adding actual messages to return_value
  • Add destructor, so as to not postpone rd_kafka_Destroy needlessly

Possible follow-up PR:

  • add connect and disconnect methods, perhaps allowing users to specify the wait in MS
  • Add beginning and end offset constants
  • Deprecate the set_partition method, and replace it with a more PSR-compliant setPartition method (camel-cased methods are preferred 21 to 1 -> http://www.php-fig.org/psr/psr-2/)

@EVODelavega EVODelavega closed this Apr 9, 2015
EVODelavega pushed a commit to EVODelavega/phpkafka that referenced this pull request Jun 24, 2015
* commit '19c892a28629696ff0c75a4d1001edd756e188f4':
  Add getPartitionOffsets method (not ready to be used, though)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant