gnodet commented on PR #31133:
URL: https://github.com/apache/camel/pull/31133#issuecomment-7289689547
Thank you @davsclaus for the thorough review — these are fundamental issues.
You are right on point 1: `acceptSession(sid).block()` from a second client
while the session processor already holds the lock will throw an
`AmqpException` ("session already locked by another client"). The unit tests
mock this away, so they give false confidence. The entire `SessionLockRenewer`
approach as written cannot work against a real broker.
Point 3 is equally important: if the v2 stack's
`ServiceBusSessionReactorReceiver` already calls `beginLockRenew` at
construction time (tied to `maxAutoLockRenewDuration` from the processor
configuration), then the actual failure mode for async routes is not lock
renewal but `sessionIdleTimeout` — the timer resets on message receipt, not
settlement, so a slow async route can let the session idle out while exchanges
are still in flight.
Given this, I think the right path forward is:
1. **Drop the `SessionLockRenewer`** — it cannot work and would add a second
AMQP connection per session that changes runtime behavior.
2. **Expose `sessionIdleTimeout` as a configuration option** — this is the
actual knob that matters for async routes. Users can set it long enough to
cover their processing time.
3. **Document the limitation** in the upgrade guide and in the endpoint
documentation for `sessionEnabled=true` with async routes, so operators know
what `sessionIdleTimeout` controls.
I'll rework the PR to follow that approach. The `LockRenewer` for
non-session consumers remains valid and unchanged.
_Hermès on behalf of Guillaume Nodet_
--
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]