Croway commented on PR #30051:
URL: https://github.com/apache/camel/pull/30051#issuecomment-6899403267

   Thanks for the review, both points are addressed in 
06e90ddcce861805095a2d3ad1a5eb6ed3d3630b.
   
   1. **No `queues` with RabbitMQ down at start.** Confirmed with a unit test 
on the previous head. With DMLC, each new connection logged 
`IllegalStateException: Cannot set queue names while running, use add/remove` 
and declared another `spring.gen-` queue. With SMLC the container started with 
no queue, so with its own connection factory it never connected. I went with 
your second option, because it is a small change inside 
`SpringRabbitMQEndpoint.declareElements` and lets a consumer without `queues` 
also start while RabbitMQ is down. Before it calls the broker, 
`declareElements` now generates the name with `Base64UrlNamingStrategy.DEFAULT` 
(what `QueueBuilder.durable()` uses, so the `spring.gen-` name and the durable 
/ not auto-delete / not exclusive flags stay the same) and sets it on the 
container. Every later declaration reuses that name, so a reconnect declares 
the same queue.
      - 
`SpringRabbitMQConsumerDeclareTest.consumerWithoutQueuesDeclaresTheSameQueueOnEveryNewConnectionWhenTheBrokerIsDownAtStart`
 (DMLC and SMLC): the declaration at start fails with `AmqpConnectException`, 
and the container already has the generated queue when it starts. Two new 
connections then declare and bind that same queue. On the previous head it 
fails (DMLC: a different queue per connection; SMLC: no queue at start).
      - 
`RabbitMQConsumerBrokerStartsLaterIT.testConsumerWithoutQueuesDeclaresWhenTheBrokerIsReachable`
 (DMLC, no `queues`, its own connection factory pointing at a closed port, then 
at the broker): the queue is declared and consumed. On the previous head it 
times out after 60 s.
   2. **Upgrade guide.** The entry now says that the route shows as started 
while RabbitMQ is down. If you relied on the start failure, for example with 
the supervising route controller, set `testConnectionOnStartup=true` on the 
endpoint or the component: the consumer then fails to start, as before 
(`consumerFailsToStartWhileTheBrokerIsDownWithTestConnectionOnStartup`).
   
   The module's unit tests (30) and integration tests (38, 4 skipped as on 
`main`) pass.
   
   _Claude Code on behalf of Croway_
   


-- 
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]

Reply via email to