Skip to content

Align properties for camel infra command #18356

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Croway
Copy link
Contributor

@Croway Croway commented Jun 12, 2025

$ camel infra run rabbitmq --json
{
  "connectionProperties" : { },
  "getAmqpUrl" : "amqp://localhost:5672",
  "getHttpPort" : 15672,
  "initialize" : null,
  "managementPassword" : "guest",
  "managementUri" : "http://localhost:15672",
  "managementUsername" : "guest",
  "shutdown" : null,
  "uri" : "amqp://localhost:5672"
}
        CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
        cachingConnectionFactory.setUri("amqp://localhost:5672");
        getCamelContext().getRegistry().bind("rabbitConnectionFactory", cachingConnectionFactory);

        from("timer:java?period=1000")
                .setBody()
                .simple("Hello Camel from ${routeId}")
                .to("spring-rabbitmq:cheese?routingKey=cheese");

        from("spring-rabbitmq:cheese?routingKey=cheese")
                .log("${body}");

The Management GUI is accessible at managementUri, and managementUsername and managementPassword can be used to log in to it.

@Croway Croway force-pushed the align-infra-run-properties branch from 51e91da to 9f7c623 Compare June 12, 2025 12:29
@Croway Croway force-pushed the align-infra-run-properties branch from 9f7c623 to 34207a5 Compare June 12, 2025 12:55
@Croway
Copy link
Contributor Author

Croway commented Jun 12, 2025

$ camel infra run kafka --json
{
  "brokers" : "localhost:9092",
  "getBootstrapServers" : "localhost:9092"
}
- route:
    id: route-8109
    from:
      uri: timer:yaml
      parameters:
        period: "1000"
      steps:
        - setBody:
            simple: Hello Camel from ${routeId}
        - to:
            id: to-1494
            uri: kafka
            parameters:
              brokers: localhost:9092
              topic: cheese
- route:
    id: route-4039
    from:
      id: from-1758
      uri: kafka
      parameters:
        brokers: localhost:9092
        topic: cheese
      steps:
        - log:
            id: log-1871
            message: ${body}

@Croway
Copy link
Contributor Author

Croway commented Jun 12, 2025

$ camel infra run sftp --json
{
  "directoryName" : "myTestDirectory",
  "getFtpRootDir" : "file:///Users/fmariani/Repositories/croway/camel/target/ftp/camel-test-infra-test-directory/res/home",
  "getPort" : 2222,
  "host" : "localhost",
  "hostname" : "localhost",
  "password" : "admin",
  "port" : 2222,
  "username" : "admin"
}
- route:
    id: route-1271
    from:
      uri: timer:yaml
      parameters:
        period: "1000"
      steps:
        - setBody:
            simple: Hello Camel from ${routeId}
        - to:
            id: to-1276
            uri: ftp
            parameters:
              directoryName: myTestDirectory
              host: localhost
              password: admin
              port: 2221
              username: admin
- route:
    id: route-2332
    autoStartup: true
    from:
      id: from-3038
      uri: ftp
      parameters:
        directoryName: myTestDirectory
        host: localhost
        password: admin
        port: 2221
        username: admin
      steps:
        - log:
            id: log-2189
            message: ${body}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants