Comments (8)
Here, definitely. These discussions are, in theory, easier to find for the general public.
This is a good idea, and probably best achievable by creating additional subscription strategies. The Subscription class has an initialized
future which could be used to communicate failure to bind.
from op-rabbit.
I added support for passive bindings, but now it just keeps failing and retrying (without even pausing). However, I think this is a separate issue of how to handle subscription failures. The same problem can occur with the existing bindings if you try to bind to an existing queue with "wrong" parameters (durability, auto-delete, etc.).
from op-rabbit.
FWIW, this incessant retrying behavior has caused me some grief today as well.
My use case is the opposite of @talp-traiana: I want to use an existing non-autodelete queue if it exists, or create an autodelete one if it doesn't (because the client app is a good citizen); but the effect is the same. Would really like to be able to control the binding behavior and handle failures explicitly.
from op-rabbit.
@unthingable It sounds to me like you'd like to do a custom binding, or compose bindings together using something like an orElse
operator?
I'm not happy with the present passing of error-logging et. al via implicits on the consumer binding, and am planning to change it. After that point, it'll be easier to define custom bindings.
from op-rabbit.
@timcharper I'd like to at least be able to check for queue presence and handle binding error explicitly. Doing it the opinionated way would require supporting at least three clearly selectable behaviors:
- Expect the queue to exist, fail otherwise (@talp-traiana's case)
- Expect the queue to not exist, fail otherwise
- Use the queue if it exists (ignoring supplied parameters), otherwise create with supplied parameters.
In general, setting up queues and bindings is too a nontrivial affair to wrap all of that in something like a single topic()
or even queue()
directive. I can see their intent of making things easy, but in practice they are having to make too many decisions to cover enough use cases.
from op-rabbit.
FYI - @talp-traiana the above patch, slated for M12 release, addresses the infinite retry. Retry will only occur on connection errors.
from op-rabbit.
FYI - M12 release went out. v1.0.0-M11...v1.0.0-M12
from op-rabbit.
Marking as resolved, since this now supported.
@unthingable can you open up an additional issue for your request?
from op-rabbit.
Related Issues (20)
- Exemplify how to provide config at runtime HOT 1
- Messages getting stuck in retry queue even though max retry count is not met HOT 1
- Support for consuming of messages different types HOT 3
- Handling 403 ACCESS_REFUSED for exclusive consumers
- Improve circe encoder HOT 2
- Suggestion: change Message and all composed classes from class to case class
- read from one RabbitMQ and publish to another HOT 2
- publish scala 2.13 release HOT 8
- upgrade to Play JSON 2.7.4
- I can read from this RabbitMQ, but not using op-rabbit HOT 4
- DeadLetter not recognised
- Direct queue properties
- Release a new version HOT 2
- Is asynchronous nack thread blocking? HOT 4
- Delayed message addon
- Add x-queue-mode to predefined queue props
- Where is op-rabbit-upickle published? HOT 1
- Can someone help provide how to do proper shutdown in demo? HOT 3
- Apache Pekko support HOT 2
- No retry on Exception message: Socket closed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from op-rabbit.