AmiradelBeyg opened a new pull request, #284:
URL: https://github.com/apache/pulsar-dotpulsar/pull/284

   ## Summary
   
     `ProducerBuilder.Create()` rejects `MaxPendingMessages = 0`, but
     `PulsarClient.CreateProducer(ProducerOptions<TMessage>)` did not.
   
     This made producer creation behavior inconsistent depending on which API 
path was used. It also allowed an invalid
     configuration to reach the internal send queue, which could hide problems 
until high-volume or production usage.
   
     ## Changes
   
     - add missing `MaxPendingMessages > 0` validation in 
`PulsarClient.CreateProducer`
     - keep the existing builder behavior unchanged
     - add unit coverage for both producer creation paths
   
     ## Why
   
     Both producer creation APIs should enforce the same contract. Rejecting 
invalid configuration early is clearer and
     prevents subtle runtime issues caused by a zero-capacity pending message 
limit.
   
     ## Testing
   
     - added unit test for 
`PulsarClient.CreateProducer(ProducerOptions<TMessage>)`
     - added unit test for `ProducerBuilder.Create()`
     - ran:
   
     ```bash
     dotnet test tests/DotPulsar.Tests/DotPulsar.Tests.csproj --filter 
"PulsarClientProducerValidationTests|
     ProducerBuilderTests"
   
     ## Notes
   
     I did not add an integration test for MaxPendingMessages because there was 
no existing integration coverage for this
     option, and the bug is a validation/contract issue at the API boundary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to