Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Magnus Edenhill
    @edenhill
    Looks like it is. maybe you have an old version
    Craig Patrick
    @cpats007
    hmmmm
    Magnus Edenhill
    @edenhill
    anyhoo, Ive never used the php client so I dont know. Not erally sure what Im doing here! ;)
    Craig Patrick
    @cpats007
    ha ha ha, well you've certainly given me a huge step forward!
    could it be because I'm using the stubs? and maybe the stubs are outdated?
    Craig Patrick
    @cpats007
    Okay, so by the looks of it, I have version 0.9.2 (latest released version) but there is a version 3.0 - however it wont install
    Paul Dragoonis
    @dragoonis
    Happy new year everyone :)
    @edenhill can you spare time to look at a bug report that I'm about to file with librdkafka ? (seg fault) Happening with PHP 5.6 and PHP7
    Magnus Edenhill
    @edenhill
    sure
    Paul Dragoonis
    @dragoonis
    I'm busy gathering all info from the checklist on your "create issue" page.
    Magnus Edenhill
    @edenhill
    I will need a C backtrace or similar though.
    Paul Dragoonis
    @dragoonis
    ..................FFF........S.SS..[New Thread 0x7fffdfccf700 (LWP 20884)]
    [Thread 0x7fffdfccf700 (LWP 20884) exited]
    [New Thread 0x7fffdfccf700 (LWP 20886)]
    [Thread 0x7fffdfccf700 (LWP 20886) exited]
    .......[New Thread 0x7fffdfccf700 (LWP 20887)]
    [Thread 0x7fffdfccf700 (LWP 20887) exited]
    [New Thread 0x7fffdfccf700 (LWP 20888)]
    [Thread 0x7fffdfccf700 (LWP 20888) exited]
    ...........
    Program received signal SIGSEGV, Segmentation fault.
    0x00007fffec678a3b in rd_kafka_new () from /lib64/librdkafka.so.1
    (gdb) quit
    Magnus Edenhill
    @edenhill
    bt
    Paul Dragoonis
    @dragoonis
    Do you want me to type bt to get the gdb backtrace? (it's not me running this, it's another team member)
    Sure! Will do
    Magnus Edenhill
    @edenhill
    yah
    Paul Dragoonis
    @dragoonis
    @edenhill 0.92 was segfaulting, we're pulling down latest librdkafka version (runtime) => 0.9.2-257-g65c8bc and it's working OK
    So you've patched it. It may be this. edenhill/librdkafka#850 - I'm getting a bt so we know what issue we ran into though. To close this off :)
    Magnus Edenhill
    @edenhill
    :+1:
    Paul Dragoonis
    @dragoonis
    @edenhill can you tell me when the next stable release is planned?
    Magnus Edenhill
    @edenhill
    0.9.3 is a maint release which is due in about 1-2 weeks
    then there'll be a new feature release in a month or so
    Paul Dragoonis
    @dragoonis
    i have bt
    Magnus Edenhill
    @edenhill
    it'd be great if you want to test the 0.9.3.x branch to make sure the above crash is fixed
    Magnus Edenhill
    @edenhill
    yep
    thanks for the backtrace, it didnt say much though but that's fine, you probably identified the issue anyway.
    Paul Dragoonis
    @dragoonis
    maybe :D We're a high level consumer now (thanks to your help ;))
            // Global config settings - see: https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md#global-configuration-properties
            $conf = new ConsumerConf();
            $conf->set("enable.auto.commit", "false");
            $conf->set("socket.blocking.max.ms", 1);
            $conf->set("fetch.wait.max.ms", 10);
            $conf->set('metadata.broker.list', implode(',', $brokers));
            $conf->set('group.id', $this->generateGroupId($topicName, $partition));
    
            $conf->setErrorCb(function ($kafka, $err, $reason) {
                printf("Kafka error: %s (reason: %s)\n", rd_kafka_err2str($err), $reason);
            });
    
            $topicConf = new TopicConf();
            $topicConf->set('auto.offset.reset', 'smallest');
    
            $conf->setDefaultTopicConf($topicConf);
    
            $consumer = new HighLevelConsumer($conf);
            $consumer->assign([
                new TopicPartition($topicName, $partition, RD_KAFKA_OFFSET_STORED)
            ]);
    Magnus Edenhill
    @edenhill
    :100:
    Paul Dragoonis
    @dragoonis
    How's it looking, boss?
    Magnus Edenhill
    @edenhill
    looks great. That's not a balanced consumer though, just a standalone consumer since you use assign() rather than subscribe()
    but that's up to you and your use-case
    Paul Dragoonis
    @dragoonis
    I think, based on my use-case you said I should use assign()
    apocello2008
    @apocello2008
    @edenhill Hello! I wrote a message some days ago, can you see pm please?
    ryanminside
    @ryanminside

    PHP 5.9:

    vagrant@vagrant$ php --version
    PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct  3 2016 13:00:37)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
        with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

    php-rdkafka 3.0.1 and librdkafka 0.9:

    vagrant@vagrant$ php --ri rdkafka
    
    rdkafka
    
    rdkafka support => enabled
    version => 3.0.1
    build date => Feb  6 2017 14:43:27
    librdkafka version (runtime) => 0.9.2-291-g281ca3
    librdkafka version (build) => 0.9.4.0
    Eliurkis
    @eliurkis_twitter
    People, I am trying to do:
    sudo pecl install channel://pecl.php.net/rdkafka
    But I am getting a bunch of errors like:
    /tmp/pear/install/rdkafka/rdkafka.c:662:19: note: each undeclared identifier is reported only once for each function it appears in
         COPY_CONSTANT(RD_KAFKA_RESP_ERR__ISR_INSUFF);
                       ^
    /usr/include/php/20151012/Zend/zend_constants.h:42:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
     #define REGISTER_LONG_CONSTANT(name, lval, flags)  zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
                                                                                                             ^
    /tmp/pear/install/rdkafka/rdkafka.c:662:5: note: in expansion of macro ‘COPY_CONSTANT’
         COPY_CONSTANT(RD_KAFKA_RESP_ERR__ISR_INSUFF);
         ^
    make: *** [rdkafka.lo] Error 1
    ERROR: `make' failed
    Magnus Edenhill
    @edenhill
    @eliurkis_twitter Is your librdkafka version too old perhaps?
    Eliurkis
    @eliurkis_twitter
    @edenhill
    vagrant@homestead:~/php-rdkafka$ sudo apt-get install librdkafka1
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    librdkafka1 is already the newest version.
    Look like it's up-to-date
    Eliurkis
    @eliurkis_twitter
    Any idea?
    Magnus Edenhill
    @edenhill
    what version is that?
    Eliurkis
    @eliurkis_twitter
    vagrant@homestead:~/php-rdkafka$ sudo apt-cache policy librdkafka1
    librdkafka1:
      Installed: 0.8.3-1ubuntu2
      Candidate: 0.8.3-1ubuntu2
      Version table:
     *** 0.8.3-1ubuntu2 0
            500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
            100 /var/lib/dpkg/status
    @edenhill
    Magnus Edenhill
    @edenhill
    whoa, that's very old
    Eliurkis
    @eliurkis_twitter
    It's the one that have Ubuntu on the repo
    Magnus Edenhill
    @edenhill
    You want 0.9.1 or later (0.9.3 was just pushed to latest ubuntu)