davsclaus opened a new pull request, #29748: URL: https://github.com/apache/camel/pull/29748
## Summary [CAMEL-24823](https://issues.apache.org/jira/browse/CAMEL-24823): `camel infra run artemis` mapped 61616, 8161, 1883 and 5672 on the host. 1883 is mosquitto's port and 5672 is RabbitMQ's, so Artemis couldn't run next to `camel infra run mosquitto`, and it failed with a stack trace that didn't name the port. - **Artemis ports:** Artemis maps the core acceptor (61616) and the web console (8161). It maps MQTT and AMQP only on request: `--property artemis.ports=mqtt,amqp` (or `all`), using the existing `--property` option. An unknown protocol is refused. `ArtemisContainer.withFixedPort()` is used only by `camel infra run` (`ArtemisAllInfraService`). Tests that create `new ArtemisContainer()` keep all four ports on random host ports. - **A taken port is one line:** when a service doesn't start because a port it maps on the host is taken, `camel infra run` finds the port in the Docker or Podman error and the running infra service whose service data has that port. Then it fails with exit code 1: ``` ERROR: Cannot start artemis: port 1883 is in use by mosquitto (PID 316761), stop it first with: camel infra stop mosquitto ``` It says "by another program" when no infra service has the port. This works for every service, not only Artemis. - **Docs:** the upgrade guide (4.24) and the dev-services page cover both changes. None of the catalog examples that use Artemis (artemis, camel-1-tribute, ftp, jms-request-reply) use MQTT or AMQP. They are JMS on 61616. ## Test plan - [x] New `ArtemisContainerPortsTest` (the default ports, the ones on request, an unknown protocol) and `InfraPortInUseTest` (the Docker and Podman messages, the service that has the port, another program, a failure that isn't about a port). - [x] All `Infra*Test` in camel-jbang-core pass, also merged with #29747 (the other `InfraRun` change). - [x] Live with the worktree's launcher. With `camel infra run mosquitto` running, `camel infra run artemis` (with the old Artemis jar) prints the line above and exits with 1, and no container is left behind. - [x] Live with the new Artemis classes. Artemis starts next to mosquitto with ports `[61616, 8161]`, and with `artemis.ports=amqp` it gets `[61616, 8161, 5672]`. A JMS connection to 61616 works. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
