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

Old messages left in return queue #3

Open
LouisDK opened this issue Dec 3, 2015 · 1 comment
Open

Old messages left in return queue #3

LouisDK opened this issue Dec 3, 2015 · 1 comment
Assignees

Comments

@LouisDK
Copy link

LouisDK commented Dec 3, 2015

When a client send a message to a microservice, the client needs to identity a queue to be used for the return message.
The clients gets a "unused" queue from QueuePool.Instance.Get();
But the fact that it is unused is determined by the client keeping track of which return queues are used.
If the previous user of the queue never fetched its message from this queue, the queue might still have a message in it.

I solved this problem by purging the queue everytime I get an "unused" queue from QueuePool.Instance.Get() by doing a channel.QueuePurge(queue.Name)

Change Request

Since the assumption is that when a client gets a new return queue from QueuePool.Instance.Get(), that it would be "ready for use", and empty, would it be possible to make this a default behavior (first purging any potential messages from it) inside QueuePool.Instance.Get() before returning the queue to the client?

@daishisystems daishisystems self-assigned this Dec 3, 2015
@daishisystems
Copy link
Owner

Let's include this as default initialisation behaviour when retrieving a Queue.

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

No branches or pull requests

2 participants