Document the thread safety contract on every public Event Hubs type
Los mantenedores suelen responder en 1 día
@j7nw4r ya está trabajando en esto.
Desde el 5/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
No public Event Hubs header gives a thread safety guarantee. The C++ guidelines make thread safety mandatory for a service client. The .NET library gives the guarantee in its README and in its reference documents. A C++ caller has no way to learn which types are safe to share.
Parent: #7284. Severity tags follow the key in #7252. The code anchors refer to commit 2de7c583e.
Motivation
A search of sdk/eventhubs for "thread safe", "thread-safe" and "thread safety" finds one file. That file is a third-party header in the stress test (test/eventhubs-stress-test/src/inc/argagg.hpp:612). No client header, no model header and no README says anything.
The .NET README gives the guarantee in two sentences. The C++ library can use the same words. The first sentence says that all client instance methods are thread safe and independent of each other. The second says that each Event Hubs client type is safe to cache and to use as a singleton for the life of the application. The processor README repeats this for EventProcessorClient.
The .NET and Python documents both say that their batch type is not thread safe. The C++ library needs the same restriction on EventDataBatch.
The C++ guidelines demand the behavior. They say nothing about how to document it. The document design below follows .NET practice, not a C++ rule. Tell the GA API review which part is mandatory and which part is practice.
Proposal
Give the guarantee on each client type.
-
ProducerClient(inc/azure/messaging/eventhubs/producer_client.hpp). [GA quality bar] -
ConsumerClient(inc/azure/messaging/eventhubs/consumer_client.hpp). [GA quality bar] -
PartitionClient(inc/azure/messaging/eventhubs/partition_client.hpp). [GA quality bar] -
ProcessorandProcessorPartitionClient(inc/azure/messaging/eventhubs/processor.hpp,inc/azure/messaging/eventhubs/processor_partition_client.hpp). [GA quality bar] -
CheckpointStore, on the abstract base class (inc/azure/messaging/eventhubs/checkpoint_store.hpp). A third-party implementor must learn that the implementation must be thread safe. The processor calls it from its own partition threads. [GA quality bar]
Give the restriction on each model type.
-
EventDataBatch(inc/azure/messaging/eventhubs/event_data_batch.hpp). [GA quality bar] -
Models::EventData, and the checkpoint and ownership record structures (inc/azure/messaging/eventhubs/models/). [GA quality bar]
Then update the package documents.
- Add a thread safety section to the package README. Use the .NET words about caching a client for the life of the application. [GA quality bar]
- Record the guarantee and the batch restriction in the changelog for the release that contains them. [GA quality bar]
The words must agree with the code. Do this change after the behavior is correct, or do it in the same change.
Validation
- Each public client type gives its thread safety guarantee in its class documentation.
- Each model type that is not thread safe gives that restriction.
- The README has a thread safety section.
- A reviewer who reads only the headers can identify which types are safe to share across threads.
- Lenguaje dominante
- C++
- Estrellas
- 206
- Forks
- 173
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 27
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azure-sdk-for-cpp
-
bug EngSys
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Azure/azure-sdk-for-cpp#7362 ·
Los mantenedores suelen responder en 1 día
-
Client needs-team-attention Service Attention Storage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Azure/azure-sdk-for-cpp#7347 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Client Event Hubs needs-team-attention Service Attention
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Azure/azure-sdk-for-cpp#7333 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
DataLakeDirectoryClient::ListPaths() throws exception for folders whose names contain spaces.Posiblemente ocupada @Jinming-Hu la tomó hoy. AbiertoClient customer-reported question Service Attention Storage
Azure/azure-sdk-for-cpp#7475 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Azure Storage STG105 Feature TestsPosiblemente ocupada @Jinming-Hu la tomó hace 11 días. AbiertoClient Storage
Azure/azure-sdk-for-cpp#7449 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/azure-sdk-for-cpp
Issues similares
-
[开源推荐] Windows 系统维护工具箱,支持后台任务队列Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
521xueweihan/HelloGitHub#4011 ·
-
docs(simulation): Quickstart publishes UDP 14550, which the SITL images' own docs say not to doAbiertostatus:needs-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
PX4/PX4-Autopilot#29292 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
I/O internal correctness medium priority rt_lib
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Mac mini M6 (16 GB): Q2_0 streaming works - measured 11.7->27.2 tok/s + arena fix for sub-32 GB MacsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día