Skip to content
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

Use log macros for AMQP #12617

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Use log macros for AMQP #12617

merged 2 commits into from
Oct 31, 2024

Conversation

ansd
Copy link
Member

@ansd ansd commented Oct 30, 2024

Using a log macro has the benefit that location data is added as explained in https://www.erlang.org/doc/apps/kernel/logger.html#t:metadata/0

This PR is based on top of #12599

Closes #9259.

 ## What?
Allow an AMQP 1.0 client to renew an OAuth 2.0 token before it expires.

 ## Why?
This allows clients to keep the AMQP connection open instead of having
to create a new connection whenever the token expires.

 ## How?
As explained in #9259 (comment)
the client can `PUT` a new token on HTTP API v2 path `/auth/tokens`.
RabbitMQ will then:
1. Store the new token on the given connection.
2. Recheck access to the connection's vhost.
3. Clear all permission caches in the AMQP sessions.
4. Recheck write permissions to exchanges for links publishing to
   RabbitMQ, and recheck read permissions from queues for links
   consuming from RabbitMQ. The latter complies with the user
   expectation in #11364.
Using a log macro has the benefit that location data is added as
explained in https://www.erlang.org/doc/apps/kernel/logger.html#t:metadata/0
@ansd ansd added this to the 4.1.0 milestone Oct 30, 2024
@michaelklishin
Copy link
Member

You likely mean #12599 and not its corresponding documentation PR :)

@michaelklishin
Copy link
Member

FTR, as discussed internally, this is primarily useful for structured logging. Text file logging may benefit from it if we choose to change the format one day but structured (e.g. JSON logging) stands to gain the most.

@ansd
Copy link
Member Author

ansd commented Oct 30, 2024

You likely mean #12599 and not its corresponding documentation PR :)

Yes, thanks :)

@michaelklishin michaelklishin merged commit 67bc950 into main Oct 31, 2024
274 checks passed
@michaelklishin michaelklishin deleted the amqp-log-macro branch October 31, 2024 18:25
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