You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Pasquale Congiusti (Jira)" <ji...@apache.org> on 2025/02/11 08:22:00 UTC
[jira] [Commented] (CAMEL-21735) MongoDB component connecting to localhost event if connection data is set
[ https://issues.apache.org/jira/browse/CAMEL-21735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17925889#comment-17925889 ]
Pasquale Congiusti commented on CAMEL-21735:
--------------------------------------------
I think this would be more suitable for Camel Quarkus project. The extension (which is the one used in Camel K) can be responsible for a different behavior. My suggestion is to try a simple reproducer over plain Camel or Camel Springboot as well as for Camel Quarkus and see if it's indeed a core problem or, as I presume, a runtime problem instead.
> MongoDB component connecting to localhost event if connection data is set
> -------------------------------------------------------------------------
>
> Key: CAMEL-21735
> URL: https://issues.apache.org/jira/browse/CAMEL-21735
> Project: Camel
> Issue Type: Bug
> Components: camel-mongodb
> Affects Versions: 4.8.0
> Reporter: Luis Sergio Faria Carneiro
> Priority: Major
>
> I'm trying to use the MongoDB component within a Camel K integration. And the code is as following:
> {code:java}
> - to:
> uri: mongodb:dummy
> parameters:
> operation: findAll
> collection: environment
> database: environments
> username: someuser
> password: somepass
> hosts: somehost:27017{code}
> Although the connection parameters are set, I see component trying to connect to 127.0.0.1:27017.
> Debugging the source code and checking the log, I see the component is using an autowired client which is configured to localhost instead of creating a new client from my parameters.
> I haven't configured any beans.
> But anyways, shoudn't the endpoint parameters take precedence over any pre-configured bean which I'm not even aware of?
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)