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

refactor: use cache for push in AMQP plugin #612

Merged
merged 4 commits into from
Feb 5, 2024
Merged

Conversation

aneojgurhem
Copy link
Contributor

No description provided.

lemaitre-aneo
lemaitre-aneo previously approved these changes Feb 5, 2024
Adaptors/Amqp/src/PushQueueStorage.cs Outdated Show resolved Hide resolved

var pool = senders_.GetOrAdd(address,
s => new ObjectPool<SenderLink>(parallelismLimit_,
async token => new SenderLink(new Session(await ConnectionAmqp
Copy link
Contributor

Choose a reason for hiding this comment

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

So each Link have its own Session. Is it something we want to keep?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for now yes

Adaptors/QueueCommon/src/Amqp.cs Outdated Show resolved Hide resolved
_) => new ValueTask<bool>(!link.IsClosed &&
!link.Session.IsClosed)));

await pool.WithInstanceAsync(sender => sender.SendAsync(new Message(Encoding.UTF8.GetBytes(msgData.TaskId))
Copy link
Contributor

Choose a reason for hiding this comment

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

You did not pass the cancellation token to SendAsync.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not take cancellation tokens

@lemaitre-aneo lemaitre-aneo self-requested a review February 5, 2024 08:34
@aneojgurhem aneojgurhem merged commit d67fd86 into main Feb 5, 2024
74 checks passed
@aneojgurhem aneojgurhem deleted the jg/pushcache branch February 5, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants