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

Reduce Dispatcher-totalPermits by number of messages delivered in batch #67

Merged
merged 1 commit into from
Oct 17, 2016

Conversation

rdhabalia
Copy link
Contributor

Motivation

Dispatcher.totalPermits and Consumer.messagePermits count must be consistent else it may block client-consumer while fetching messages. Right now, it is inconsistent in case of Batch-message with shared-subscription consumer usecase.

Modifications

Maintain permits-counter in Dispatcher and Consumer by reducing total number of messages sent in a given batch-message rather just considering 1 message per batch-message in Dispatcher.

Result

It will maintain Dispatcher and Consumer permits-counter and that can prevent possible consumer-message blocking.

@rdhabalia rdhabalia added the type/bug The PR fixed a bug or issue reported a bug label Oct 17, 2016
@rdhabalia rdhabalia added this to the 1.15 milestone Oct 17, 2016
@rdhabalia rdhabalia self-assigned this Oct 17, 2016
@yahoocla
Copy link

CLA is valid!

2 similar comments
@yahoocla
Copy link

CLA is valid!

@yahoocla
Copy link

CLA is valid!

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@merlimat merlimat merged commit 3e4e127 into apache:master Oct 17, 2016
@rdhabalia rdhabalia deleted the dispatcher-premit branch November 11, 2016 23:04
sijie added a commit to sijie/pulsar that referenced this pull request Mar 4, 2018
massakam pushed a commit to massakam/pulsar that referenced this pull request Aug 6, 2020
hrsakai pushed a commit to hrsakai/pulsar that referenced this pull request Dec 10, 2020
Change-Id: I9d5d544808a6f739d79776a4f154d7caceaa133c

remove extra timeout param on UnackedMessageTracker#handlerCmd
hangc0276 pushed a commit to hangc0276/pulsar that referenced this pull request May 26, 2021
This PR is adding:

* integrations tests for KoP with testcontainers,
* librdkafka support by allowing ListOffsets in v0

# Produce and Consume support

## Golang

* [https://github.com/Shopify/sarama](https://github.com/Shopify/sarama)
* [https://github.com/confluentinc/confluent-kafka-go](https://github.com/confluentinc/confluent-kafka-go)

## Rust

* [https://github.com/fede1024/rust-rdkafka](https://github.com/fede1024/rust-rdkafka)

## NodeJS

* [https://github.com/Blizzard/node-rdkafka](https://github.com/Blizzard/node-rdkafka)

# Partial support

### [kafka-node](https://www.npmjs.com/package/kafka-node)

Producing is working, but consuming is failing as the library is sending FETCH v0 regardless of API_VERSIONS responses:

```
DEBUG io.streamnative.kop.KafkaCommandDecoder - Write kafka cmd response back to client. request: RequestHeader(apiKey=FETCH, apiVersion=0, clientId=kafka-node-client, correlationId=4)
INFO  io.streamnative.kop.KafkaIntegrationTest - STDOUT: Error: Not a message set. Magic byte is 2
```
cbornet pushed a commit to cbornet/pulsar that referenced this pull request Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants