Skip to content

[codex] Expose client remote address in connect intercept#2

Open
HTHou wants to merge 2 commits into
release-timecho-0.19.0from
codex/expose-client-remote-address
Open

[codex] Expose client remote address in connect intercept#2
HTHou wants to merge 2 commits into
release-timecho-0.19.0from
codex/expose-client-remote-address

Conversation

@HTHou

@HTHou HTHou commented Jun 12, 2026

Copy link
Copy Markdown

Summary

Expose the connecting client Netty Channel through InterceptConnectMessage; remote socket address helpers continue to be available and now derive from the channel when no explicit address is provided.

Changes

  • Thread the Netty channel from MQTTConnection through PostOffice and BrokerInterceptor.
  • Add getChannel(), getRemoteAddress(), getClientAddress(), and getClientPort() to InterceptConnectMessage.
  • Keep existing connect-message constructors and one/two-argument interceptor notification paths compatible.
  • Add coverage proving connect intercept messages include the channel and can derive the remote address from it.

Validation

  • ./mvnw -pl broker -Dtest=BrokerInterceptorTest test
  • Earlier full run: ./mvnw -pl broker test -DskipITs reached Tests run: 341, Failures: 0, Errors: 0, Skipped: 6 before the local forked process hit unable to create native thread, so the full run did not complete in this environment.

@HTHou HTHou marked this pull request as ready for review June 12, 2026 02:03
@HTHou HTHou changed the base branch from main to release-timecho-0.19.0 June 12, 2026 02:18
@HTHou HTHou force-pushed the codex/expose-client-remote-address branch from 8272068 to 1fe4b3d Compare June 12, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants