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

How to close response_queue and associated channel when RPC timeouts without response #401

Open
zainvegeta opened this issue Jul 24, 2019 · 0 comments

Comments

@zainvegeta
Copy link

Dear Sir,
I have been using RawRabbit in a production application for performing RPC to a webservice on a remote PC.Sometimes the RPC client on the remote pc may loose its internet connection so the server will be creating response queues with a consumer which will never receive any response.The queue and channel created for this will stay there as there is consumer.So can you give me any options by which i can sort this out.

This is how i am performing RPC
var result = await busClient.RequestAsync<InvocationRequest, InvocationResponse>(request, ctx => ctx
.UseDedicatedResponseConsumer()
.UseRequestConfiguration(cfg => cfg
.PublishRequest(p => p
.OnDeclaredExchange(e => e
.WithName(Exchange)
.WithAutoDelete())
.WithRoutingKey(RoutingKey)
.WithProperties(prop => prop.DeliveryMode = 1))
.ConsumeResponse(r => r
.Consume(c => c
.WithRoutingKey($"response_key_{Guid.NewGuid()}"))
.FromDeclaredQueue(q => q.WithName($"response_queue_{Guid.NewGuid()}"))
.OnDeclaredExchange(e => e
.WithName(Exchange)
.WithAutoDelete()))));

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

1 participant