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/05/07 14:27:26 UTC

[GitHub] [pulsar] itaross commented on issue #6845: Subscription to topics with regex not working for non-persisten topics

itaross commented on issue #6845:
URL: https://github.com/apache/pulsar/issues/6845#issuecomment-625288758


   > > @codelipenghui have you been able to reproduce? This is something that I think has never worked, but very useful
   > 
   > Can you provide a way to reproduce? In functions, sinks and sources, `--topics-pattern` will be deprecated, can you use `--inputs` replace it? [--input] and [--topic-pattern] are mutually exclusive.
   
   @wolfstudy what you are referring to is probably this line https://github.com/oncodeit/pulsar/blob/71b3819bfc11afe0f0da19df0a19e3b7a05988c5/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdSinks.java#L258
   but this involves only the name of the pattern parameter
   
   To reproduce: take any connector from Pulsar IO, a sink in this case. 
   https://archive.apache.org/dist/pulsar/pulsar-2.5.1/connectors/
   
   Follow these steps: https://pulsar.apache.org/docs/en/standalone/#install-builtin-connectors-optional
   
   Launch the connector with:
   ```
   ./pulsar-admin sinks create --tenant public --namespace default --name test-sink --sink-type jdbc  --sink-config-file <the yaml config file>  --topicsPattern "persistent://public/default/.*"
   ```
   
   content of the yaml:
   ````
   {
       "userName": "root",
       "password": "jdbc",
       "jdbcUrl": "jdbc:mysql://127.0.0.1:3306/pulsar_mysql_jdbc_sink",
       "tableName": "pulsar_mysql_jdbc_sink"
   }
   ```
   
   then retry using:
   ```
   ./pulsar-admin sinks create --tenant public --namespace default --name test-sink --sink-type jdbc  --sink-config-file <the yaml config file>  --topicsPattern "non-persistent://public/default/.*"
   ```
   You will notice that the connector will now works.
   
   I posted this example with jdbc/mysql but you can try with anything you prefer, the behaviour is the same.


----------------------------------------------------------------
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