Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulsar-sink invalid character handling #2249

Open
tincore opened this issue Oct 17, 2024 · 0 comments
Open

pulsar-sink invalid character handling #2249

tincore opened this issue Oct 17, 2024 · 0 comments

Comments

@tincore
Copy link

tincore commented Oct 17, 2024

Thanks for all the great work.

Running

JBang version: 0.117.1
Camel JBang version: 4.8.0

I'm not sure if this is expected but it seems like having invalid characters in uri parameters could be a bit unintuitive. I'm not sure if this would be the case with all kamelets or just this one. I've checked pulsar component sources and I could not find anything odd there.

This works (pulsar component). RAW() has to be added otherwise "pulsar+ssl" is parsed as "pulsar ssl" which would be invalid.

        - to: pulsar:persistent://tenant1/namespace1/topic1?serviceUrl=RAW(pulsar+ssl://localhost:1234)

When using pulsar-sink the following snippet fails because serviceUrl seems to be parsed when used in the kamelet and then in the pulsar component.

        - to:
            uri: kamelet:pulsar-sink
            parameters:
              topicType: persistent
              tenant: mytenant
              topic: mytopic
              namespaceName: mynamespace
              serviceUrl: RAW(pulsar+ssl://localhost:1234)
Caused by: java.net.URISyntaxException: Illegal character in scheme name at index 6: pulsar ssl://localhost:1234

A workaround for this seems to be nesting RAW twice. Do you know if there is any other option?
To me this seems unintuitive because you would need to know the template nesting level in order to add enough RAWs in an attribute with 'invalid' characters.

        - to:
            uri: kamelet:pulsar-sink
            parameters:
              topicType: persistent
              tenant: mytenant
              topic: mytopic
              namespaceName: mynamespace
              serviceUrl: RAW(RAW(pulsar+ssl://localhost:1234))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant