streamnative / pulsar-resources-operator

Apache License 2.0
34 stars 15 forks source link

PulsarSource does not publish in the correct tenant/namespace #228

Open brunocascio opened 3 months ago

brunocascio commented 3 months ago

Hello folks,

I'm using PulsarSource with RabbitMQ integration everything works ok, but I've noticed seems it's not publishing in the correct tenant/namespace. Instead it is publishing on public/default/<topicName>.

Here's my code:

apiVersion: resource.streamnative.io/v1alpha1
kind: PulsarSource
metadata:
  name: rabbitmq-source
spec:
  className: org.apache.pulsar.io.rabbitmq.RabbitMQSource
  connectionRef:
    name: pulsar-connection
  archive:
    url: https://archive.apache.org/dist/pulsar/pulsar-3.3.0/connectors/pulsar-io-rabbitmq-3.3.0.nar
  configs:
    host: rabbitmq.example.com
    port: "5672"
    virtualHost: myvhost
    queueName: myqueue
    username: myuser
    connectionName: pulsar-connection
    password: mypass
    passive: 'true'
  lifecyclePolicy: CleanUpAfterDeletion
  name: rabbitmq-source
  tenant: mytenant
  namespace: myns
  topicName: mytopic
  parallelism: 1
  processingGuarantees: ATLEAST_ONCE
ericsyh commented 3 months ago

@freeznet Rui, could you help take a look this?

yash2 commented 3 days ago

Could you pls try replacing with topicName: persistent://mytenant/myns/mytopic instead of topicName: mytopic in your PulsarSource yaml.