Skip to content

NULL message headers in CentOS7 on PHP5.6 #386

Open
@douyux

Description

when test message_headers.php in centos i got following output:

> php message_headers.php
6 messages delivered  
Got message: message 0 | Headers: none  
PHP Warning:  array_walk() expects parameter 1 to be array, unknown given in /root/test/message_headers.php on line 80  
Got message: message 1 | Headers: none  
PHP Warning:  array_walk() expects parameter 1 to be array, unknown given in /root/test/message_headers.php on line 80  
Got message: message 2 | Headers: none  
Got message: message 3 | Headers: none  
Got message: message 4 | Headers: none  
Got message: message 5 | Headers: none 

and var_dump($msg->headers) just print UNKNOWN:0

  • os: CentOS Linux release 7.6.1810 (Core)
  • kernel: 3.10.0-957.1.3.el7.x86_64
  • PHP version: 5.6.36
  • librdkafka version: v1.5.0
  • php-rdkafka version: 4.0.3
  • kafka version: 2.12-2.3.1

It's confused that message_headers.php is test ok in ubuntu 16.04 with same kafka server and same librdkafka & php-rdkafka version:

> php message_headers.php
6 messages delivered
%4|1599617807.761|CONFWARN|rdkafka#consumer-2| [thrd:app]: Configuration property dr_msg_cb is a producer property and will be ignored by this consumer instance
Got message: message 0 | Headers: key: value
Got message: message 1 | Headers: key1: value1, key2: value2, key3: value3
Got message: message 2 | Headers: gzencoded: gzdata
Got message: message 3 | Headers: none
Got message: message 4 | Headers: none
Got message: message 5 | Headers: none

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions