Il giorno mer 29 mag 2024 alle ore 11:10 Baodi Shi <ba...@apache.org> ha scritto:
> +1 > > > Thanks, > Baodi Shi > > > On May 29, 2024 at 14:50:12, Yunze Xu <x...@apache.org> wrote: > > > Hi community, > > > > Recently I found the behavior of seeking a multi-topics consumer is > > intuitive. If there are no internal consumers, the `seek` call will > > just succeed silently. > > > > > If a consumer subscribes with a regex and no topics are found, users > > might think the seek operation succeeds while no topics are sought. > > > > I suggest throwing an exception in this case to notify users that the > > consumer to seek is a multi-topics consumer that contains no topics. > > It's a breaking change so I'd like to hear more voices in the mail > What happens if it subscribed to a regex which "currently" doesn't not match any topics ? Maybe this is intentional in the application design as maybe you have dynamic topics Giving an error or failing silently doesn't fix the problem. If the application is sure that you must have at least N topics then we should make this configurable somewhere. The difference between "zero topics" or "one topic" is very small, if your application expects to subscribe to 100 topics. Enrico > > list. > > > > For now, I report an error for the C++ client [1], which might also > > affect the Python and Node.js clients. But the behavior of the Java > > client does not change. > > > > [1] https://github.com/apache/pulsar-client-cpp/pull/426 > > > > Thanks, > > Yunze > > >