apache / apache/pulsar-client-cpp
[pulsar-client-cpp] Partition key from producer does arrive in broker
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C++
- Estrelas
- 71
- Forks
- 91
- Merge médio
- 2h 33min
- PRs com merge (30d)
- 3
Descrição
Describe the bug
When using the Java client producer, the setting of Key in MessageBuilder correctly coveys this metadata to the broker. C++ client consumers can then successfully use Key_Shared subscription on this topic and we're seeing the expected keys-based consumption behavior.
However, when we use a C++ client producer, we do not get a "shared key" consumption behavior over the subscribed consumers.
To Reproduce
Steps to reproduce the behavior:
- Initiate a Java client producer. Add a Key to the MessageBuidler.
- Send messages using the MessageBuilder
- Initiate two C++ consumers using the "Key_Shared" subscription
- See key-based distributed messages over the consumers.
- Now stop the Java client producer
- Start a CPP client producer that sets the same metadata
- Now only one of the C++ client consumers retrieves all messages
Expected behavior
We'd expect to see the same "key-shared" message distribution over the consumers with a C++ client producer as with its Java equivalent.
Additional context
We suspect a difference in the protobuf schema between the Java and C++ client producers for setting the partition or ordering key and conveying this metadata to the broker. It seems that the broker does not receive the message metadata from the C++ client producer correctly.
NB: We are using the same version of C++ client and broker (both from Pulsar v2.5.0).
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece pelo MessageBuilder do produtor C++ e compare como os metadados de key ou ordering-key são serializados com o comportamento do produtor Java descrito nas etapas de reprodução. Reproduza o problema com dois consumidores C++ Key_Shared e ambos os tipos de produtor usando o Pulsar 2.5.0. O trabalho estará concluído quando o produtor C++ produzir a mesma distribuição baseada em chave entre os consumidores que o produtor Java.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- cpp, java
- Domínio
- distributed-systems
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100