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

Spread messages across all partitions #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions library.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ void kafka_err_cb (rd_kafka_t *rk, int err, const char *reason, void *opaque) {
openlog("phpkafka", 0, LOG_USER);
syslog(LOG_INFO, "phpkafka - ERROR CALLBACK: %s: %s: %s\n",
rd_kafka_name(rk), rd_kafka_err2str(err), reason);

kafka_stop(err);
}

void kafka_msg_delivered (rd_kafka_t *rk,
Expand Down Expand Up @@ -86,7 +84,7 @@ void kafka_produce(char* topic, char* msg, int msg_len)
signal(SIGPIPE, kafka_stop);

rd_kafka_topic_t *rkt;
int partition = 0;
int partition = RD_KAFKA_PARTITION_UA;

/* Create topic */
rkt = rd_kafka_topic_new(rk, topic, NULL);
Expand Down