otmanel31 opened a new issue #8383:
URL: https://github.com/apache/pulsar/issues/8383
Hi,
**Describe the bug**
I'm trying start (in server side-back end) a consumer that should subscribe
to a topic Pattern. This consumer should be able to handle all incoming message
from all connected client ( remote client) through pulsar broker.
Until now, i worked with few remote client, no more 50 clients and 4 topics
by clients. so 200 topics.
Now, i have a lot of client (50000) * 4 = 200000 topics and i'm going to
increase this number to 300k client.
When i try (in server side back-end) to start a consumer with multi topics
subscription using a topics pattern, it seems nothing happen.
Is threre any limitations using multi topics subscription using topics
pattern with a lot of topics ?
Thanks :)
**To Reproduce**
1. Create a lot of topics. As we should subscribe to a topic pattern, create
a topic name "my-topics-<number_to_increment>"
2. Create a program that should start a client and subscribe to a broker as
following:
`
PulsarClient client = null;
try {
client = PulsarClient.builder().serviceUrl(PULSAR_HOST)
.authentication(AuthenticationFactory.token(PULSAR_TOKEN)).build();
} catch (PulsarClientException e) {
LOGGER.error("{}", Arrays.toString(e.getStackTrace()));
}
// Build consumer
Consumer<byte[]> deviceConsumer = null;
StringBuilder fullTopic = new
StringBuilder().append(PULSAR_TENANT).append("/").append(PULSAR_NAMESPACE)
.append("/").append(PULSAR_TOPIC).append("-.*");
Pattern allTopicsInNamespace =
Pattern.compile(fullTopic.toString());
try {
deviceConsumer =
Objects.requireNonNull(client).newConsumer().topicsPattern(allTopicsInNamespace)
.subscriptionName("data_subscription").subscriptionType(SubscriptionType.Shared)
.messageListener(listener).subscribe();
LOGGER.info("Created consumer on topic {}",fullTopic);
} catch (PulsarClientException e) {
LOGGER.error("Error while subscribing to topics", e);
}`
3. set log to debug level if needed
4. log info level: 2020-10-26 17:47:05,932 INFO [pulsar-client-io-1-1]
org.apache.pulsar.client.impl.ConnectionPool: [[id: 0xeedd9a3c,
L:/192.168.1.15:61572 - R:pulsar.domaine_name.local/192.168.244.189:30590]]
Connected to server
==> Nothing happen after this latest log, i'm stuck. (if needed, i can share
debug level log)
**Expected behavior**
I expect to be able to consume as if i would manage 200 topics.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- pulsar version: 2.6.1
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]