You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/10/26 16:56:51 UTC

[GitHub] [pulsar] otmanel31 opened a new issue #8383: Multi topics subscription using topic pattern over lot of topics

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:
users@infra.apache.org



[GitHub] [pulsar] sijie commented on issue #8383: Multi topics subscription using topic pattern over lot of topics

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #8383:
URL: https://github.com/apache/pulsar/issues/8383#issuecomment-717523401


   @lhotari Questions are encouraged in Github. Because they are searchable on the public internet rather than in Slack.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] otmanel31 commented on issue #8383: Multi topics subscription using topic pattern over lot of topics

Posted by GitBox <gi...@apache.org>.
otmanel31 commented on issue #8383:
URL: https://github.com/apache/pulsar/issues/8383#issuecomment-925796602


   Wow sorry i forgot this issue ... Currently no log to provide. I 'll try to test it again asap and get more logs. :). I forgot this issue because we finally removed topics patterns notions from our code and handle list of all consumers manually


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on issue #8383: Multi topics subscription using topic pattern over lot of topics

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #8383:
URL: https://github.com/apache/pulsar/issues/8383#issuecomment-716974135


   I don't think multi topics subscription is meant to be used for thousands of topics.
   It's better to [join Pulsar Slack](https://pulsar.apache.org/en/contact/) and discuss use cases and recommended solutions there, instead of creating Github issues. Please describe your use case and ask your question on Slack instead.
   Since this is not a bug, please close this issue.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on issue #8383: Multi topics subscription using topic pattern over lot of topics

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #8383:
URL: https://github.com/apache/pulsar/issues/8383#issuecomment-717524306


   Oh I'm really sorry about that @otmanel31 . I'm still learning the rules of Pulsar community.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] otmanel31 closed issue #8383: Multi topics subscription using topic pattern over lot of topics

Posted by GitBox <gi...@apache.org>.
otmanel31 closed issue #8383:
URL: https://github.com/apache/pulsar/issues/8383


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] MarvinCai commented on issue #8383: Multi topics subscription using topic pattern over lot of topics

Posted by GitBox <gi...@apache.org>.
MarvinCai commented on issue #8383:
URL: https://github.com/apache/pulsar/issues/8383#issuecomment-718797558


   can you share debug level client side log?
   and it'll be better if you can also provide server side log to help diagnosing


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] otmanel31 commented on issue #8383: Multi topics subscription using topic pattern over lot of topics

Posted by GitBox <gi...@apache.org>.
otmanel31 commented on issue #8383:
URL: https://github.com/apache/pulsar/issues/8383#issuecomment-717484145


   question already asked in slack without any response. i close it as this is only a question


----------------------------------------------------------------
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:
users@infra.apache.org