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

[PPP-502] TKMS - Add decorator for message headers #87

Merged
merged 10 commits into from
Aug 6, 2024

Conversation

hussainkarafallah
Copy link
Contributor

@hussainkarafallah hussainkarafallah commented Aug 6, 2024

Context

Adding a decorator interface that services can write their headers injectors separately
To be used with cases like transfers where we want to add transfer headers in the whole service
So instead of modifying every message, you can write a single decorator

Checklist

@hussainkarafallah hussainkarafallah requested a review from a team as a code owner August 6, 2024 08:32
@hussainkarafallah hussainkarafallah changed the title good [PPP-502] TKMS - Add decorator for message headers Aug 6, 2024
@@ -144,10 +147,10 @@ protected void checkActiveTransaction(int shard, boolean transactionActive, bool

@Override
public SendMessagesResult sendMessages(SendMessagesRequest request) {
var transactionActive = TransactionSynchronizationManager.isActualTransactionActive();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making checkstyle happy
Distance between variable 'transactionActive' declaration and its first usage is 4, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).

@hussainkarafallah hussainkarafallah merged commit 7067b2c into master Aug 6, 2024
14 checks passed
@hussainkarafallah hussainkarafallah deleted the instant-transfer-decorator branch August 6, 2024 13:28
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