Skip to content

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

ansd added 2 commits October 30, 2024 10:42
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
Collaborator

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

@michaelklishin
Copy link
Collaborator

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.

3 participants