How about making the behavior when timeout configurable? And by default, it will send the `CloseProducer` cmd?
On 2021/11/17 05:52:21 Michael Marshall wrote: > Hi All, > > I noticed that the `ServerCnxTest#testCreateProducerTimeout` test > indicates that a producer will send a `CloserProducer` command when > producer creation times out for the client. > > The Java client does not follow this protocol. When the producer > creation times out, it just schedules another attempt to create the > producer. > > The C++ client does follow this protocol and is annotated with the > following comment: > > > // Creating the producer has timed out. We need to ensure the broker closes > > the producer > > // in case it was indeed created, otherwise it might prevent new create > > producer operation, > > // since we are not closing the connection > > I don't see anything in our official protocol spec indicating the > "right" behavior. Given the test coverage, it seems like the initial > design was to expect a `CloseProducer` command. However, I also see that > the broker's `ServerCnx` class will reply to a redundant `Producer` > command with a `ProducerSuccess` command, as long as the producer > is already created. > > Should I submit a PR to update the Java client to send a > `CloseProducer` command when a `Producer` command times out? > > Thanks, > Michael >