2020-09-10 12:25:49 UTC - Gabriel Volpe: Any ideas when the site will be updated? <https://pulsar.apache.org/docs/en/client-libraries/> ---- 2020-09-10 13:46:55 UTC - alex kurtser: Hello. I have a question.
Can we subscribe to a topic with regex pattern in this way tenant/namespace/.*-partition-6 i.e. the .* in the middle of the string... ---- 2020-09-10 13:47:36 UTC - alex kurtser: for some reason we can not make it working, Is the regex pattern is correct ? ---- 2020-09-10 13:49:44 UTC - Ebere Abanonu: This is how it works in pulsar clients: The client gets all the topics in a given namespace and filter it with the regex pattern. So if your regex pattern is valid then it should work +1 : alex kurtser ---- 2020-09-10 14:25:16 UTC - Hao Zhang: Maybe your regex pattern is not correct, and should use regular expression. ---- 2020-09-10 15:22:31 UTC - Seun: Thank you so very much @Ebere Abanonu. I will take this and revert ---- 2020-09-10 16:23:26 UTC - Addison Higham: @Gabriel Volpe it is already on our "master" version of the site (link here: <https://pulsar.apache.org/docs/en/next/client-libraries/>) and will roll to the main site with the next pulsar release ---- 2020-09-10 17:58:29 UTC - Nazia Firdous: When I create tenant, namespace and topics in 'standalone' cluster (which is available by default)everything works smoothly. But when I create another cluster (say 'mycluster') and associate the tenant and namespace I am getting an error message as request: <http://org.apache.pulsar.shade.javax.ws.rs|org.apache.pulsar.shade.javax.ws.rs>.ClientErrorException: HTTP 412 Precondition Failed Namespace does not have any clusters configured Below are my commands which I am running ./pulsar-admin create topics tenants/namespaces/topic1 ./pulsar-admin create topics tenants/mycluster/namespaces/topic1 ---- 2020-09-10 18:04:23 UTC - Frank Kelly: When you created the tenant did you set the cluster? In Java I have to do the following ``` private void maybeCreateTenant(String tenant) throws EventBrokerException { try { if (!admin.tenants().getTenants().contains(tenant)) { TenantInfo tenantInfo = new TenantInfo(); //@TODO Figure out how to pass in Pulsar Cluster name tenantInfo.setAllowedClusters(Collections.singleton("standalone")); admin.tenants().createTenant(tenant, tenantInfo); } } catch (PulsarAdminException e) { throw new EventBrokerException(e); } }``` ---- 2020-09-10 18:46:04 UTC - Ebere Abanonu: I think yes....I once tried creating a tenant without cluster...I could not use that tenant until I updated it with a cluster ---- 2020-09-10 18:58:10 UTC - Nazia Firdous: Yes Sir,I have set the cluster TenantsInfo Admin Role : [testrole] Allowed Cluster : [mycluster, standalone] ```try { String destination1 = tenantsName + "/" +namespacesName + "/" +topicsName; //i have tried both the way with and without cluster String destination2 = tenantsName + "/" +clusterName+"/"+namespacesName + "/" +topicsName; pulsarAdminObject .topics() .createNonPartitionedTopic(destination1); System.out.println(topicsName + " created successfully"); } catch (PulsarAdminException e) { System.out.println(e.getMessage());``` } ---- 2020-09-10 19:02:16 UTC - Frank Kelly: Did you allow a few seconds to pass after creating the tenant and namespace on the cluster before trying to create the topic? (There's a synchronization cycle when a namespace is created when policies are added to zookeeper before topics can be created) ---- 2020-09-10 19:09:40 UTC - Nazia Firdous: yes sir..i allowed a few minutes but still i am getting msg Namespace does not have any clusters configured ---- 2020-09-10 19:10:21 UTC - Frank Kelly: And what is the error message you are getting? ---- 2020-09-10 19:10:57 UTC - Nazia Firdous: i am getting same error message Namespace does not have any clusters configured ---- 2020-09-10 19:19:46 UTC - Nazia Firdous: //Sir My code is correct??? try{ String destination1 = tenantsName + "/" +namespacesName + "/" +topicsName; //i have tried both the way with and without cluster String destination2 = tenantsName + "/" +clusterName+"/"+namespacesName + "/" +topicsName; pulsarAdminObject.topics().createNonPartitionedTopic(destination1); System.out.println(topicsName + " created successfully"); } catch (PulsarAdminException e) { System.out.println(e.getMessage()); } ---- 2020-09-10 19:28:11 UTC - Frank Kelly: Sorry I've only ever used non-partitioned topics ---- 2020-09-10 19:29:45 UTC - Frank Kelly: Based on the documentation - it seems that the cluster is not part of the partitioned topic URI? <https://pulsar.apache.org/docs/en/admin-api-partitioned-topics/#pulsar-admin> ---- 2020-09-10 19:29:47 UTC - Frank Kelly: I could be wrong ---- 2020-09-10 19:30:15 UTC - Frank Kelly: <https://pulsar.apache.org/docs/en/admin-api-partitioned-topics/#java> ---- 2020-09-10 19:30:45 UTC - Frank Kelly: nvm I just realized you are creating a non-partitioned topic - sorry ---- 2020-09-10 19:30:59 UTC - Frank Kelly: But still I'm pretty sure cluster is not part of the Topic URI ---- 2020-09-11 02:15:58 UTC - Addison Higham: @Raman Gupta I just wanted to send a quick message, I was actually incorrect, shared_key consumers DO NOT guarantee order with partition changes, I misunderstood a detail previously As you mentioned, physical partitioning is what is always used and the dispatcher only works from a single partition. The relationship of `partition_key` and `ordering_key` should be thought of much like a `hash_key` and `range_key` of dynamodb or similar concepts in other nosql DBs. Essentially, the `ordering_key` is a sub key of partition key, so within a given `partition_key` the `ordering_key` can be re-used to define an ordering of the messages given that partition key that is different from the order they actually arrived! If you don't set an ordering_key, the physical ordering is used. Finally, I wanted to mention that there are some plans to improve this situation so we can guarantee ordering but I don't have a timeline yet for when that might land, but a quick overview is we are thinking that it we would introduce some additional metadata markers into the stream that would allow consumers to ensure they have consumed all the messages with old layout and then transition to the new layout, preserving the ordering ---- 2020-09-11 02:16:49 UTC - Addison Higham: additionally, we are thinking about how to change compaction such that it would properly handle changes in number of partitions ---- 2020-09-11 04:15:16 UTC - Toktok Rambo: hey all, I use pulsar in few of our Go apps (using <http://github.com/apache/pulsar-client-go|github.com/apache/pulsar-client-go>). what’s the best way for implementing a subscriber? currently I just have an infinite for loop. ```for { consumer.Receive(ctx) }``` ---- 2020-09-11 04:32:54 UTC - benji: @benji has joined the channel ---- 2020-09-11 06:50:13 UTC - Nazia Firdous: Sir my questions is When we instance an Pulsar Admin In topics Class there is no method of persistent and non persistent topics .The only method is available as Partioned and non partioned topics that's why i have selected the Non partioned topic and while creating partioned topic getting an error message as "Namespace does not have any clusters configured" ---- 2020-09-11 08:27:52 UTC - charles: Hi all, After running my Java test or a while on a Pulsar standalone Docker container, I'm encountering a *PulsarClientException.TimeoutException* on the Producer. _The setup:_ In my test I loop through a Java producer to publish on a topic, and a consumer reading from it. I measure throughput and latency. After running this test or a while, I'm encountering a PulsarClientException.TimeoutException on the Producer with the following message: > *The producer {{producer name}} can not send message to the topic {{topic name}} within given timeout.* Both producer and consumer are in async mode. _My analysis so far:_ To identify the cause, I noticed in the server logs the following log statements: > BacklogQuotaManager - Backlog quota exceeded for topic {{topic name}}. Applying [producer_request_hold] policy. > BacklogQuotaManager - Producer {{producer name}} has exceeded backlog quota on topic [{{topic}}]. Disconnecting producer > Producer - Disconnecting producer: {{producer reference}} > BacklogQuotaManager - All producers on topic [{{topic name}}] are disconnected This is followed by a list of *663* times the following log messages on the server: > 09:54:09: .ServerCnx - [/172.17.0.1:36842] Producer had already been closed: 0 > [.....] > 09:54:13: .ServerCnx - [/172.17.0.1:36842] Producer had already been closed: 0 On my client test, I see *999* times the following exception thrown: > 09:54:32.658: org.apache.pulsar.client.api.PulsarClientException$TimeoutException > [..........] > 09:54:32.736: org.apache.pulsar.client.api.PulsarClientException$TimeoutException • It is not exactly replicatable at a single moment in time. Sometimes it is triggered after 2 minutes, sometimes later (e.g. after 14 minutes). • After the 999 client side exceptions, It looks like the Producer is again connecting, and sending like nothing happened. However, after some time, this is happening again and again. I'm looking for counter measures to resolve this issue and to understand better if and how this can be prevented. Regards Charles ---- 2020-09-11 08:33:53 UTC - shangyunsi: @shangyunsi has joined the channel ---- 2020-09-11 08:47:03 UTC - Gabriel Volpe: Thanks :+1: ----
