AnonHxy opened a new pull request, #15327:
URL: https://github.com/apache/pulsar/pull/15327
### Motivation
* If we set `scheam` as null when using `PulsarClient` new consumer or
producer like this:
```Consumer<?> consumer = client.newConsumer(null)
.topic(topic)
.subscriptionName(subscription)
.subscribe();
```
It does not throw exceptions before consumer buid, but will throw exceptions
when `org.apache.pulsar.client.impl.ConsumerImpl#connectionOpened` invoked,
then try to reconnect later:
<img width="1772" alt="image"
src="https://user-images.githubusercontent.com/10233437/165218210-0203a233-47f8-4223-9c5f-3cde3505f786.png">
* For detail, the code where throws exception is located at:
https://github.com/apache/pulsar/blob/74eae1a729c33c9fead9d54594bdee5fac8ab153/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L827
### Modifications
If `schema` is null, throw exceptions when buiding the consumer or producer
### Verifying this change
- [x] Make sure that the change passes the CI checks.
### Documentation
- [x] `no-need-doc`
--
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]