Comments (5)
This sounds good. For the case of nsq_to_nsq
, the first error returned would also backoff the consumer side, which would be decent. The only thing that I don't like about returning error immediately for all messages is that message.Attempts would be incremented for all messages in flight, when, in reality, only the first message was truly attempted.
from go-nsq.
This gets back to my comment on nsqio/nsq#380 about the semantics of attempt
- I would argue it is a failed attempt if you're in a backoff window!
from go-nsq.
I like to think of it as "oh hey, while consuming I got in a bad state, I'm going to set my RDY to 0 and also not even look at anything that was in flight".
Also, with current behavior, a nsq_to_nsq would only attempt, say, 8 before the backoff window is over, meaning only 8 have a higher attempt. If we fast track returned errors in backoff windows, then up to MaxInflight messages would get an attempt incremented, which is different behavior, which could mean potentially thousands of messages are one step closer to death.
from go-nsq.
For cases where you want max attempts, I don't think considering this edge case as an attempt to be a practical concern.
For other cases (where you want "infinite" attempts) it doesn't matter anyway.
from go-nsq.
I suppose that's true, which means this issue can go forward, but I still think that NoAttempt
would be a useful addition :).
from go-nsq.
Related Issues (20)
- JUST WONDER WHY PRODUCER dose not support lookupd ! is there any official explain for this? HOT 1
- beginning close HOT 3
- panic: send closed channel - incomingMessages HOT 1
- feat: NSQ cluster or public network message synchronization
- v1.2.1 use DeferredPublish publish delay message,delay invalidation HOT 4
- SIngleton Producer HOT 2
- Can you tag v1.0.9 HOT 1
- How to use Command? HOT 1
- Support NSQ in ArgoLabs Dataflow HOT 1
- the tag of v1.0.8, and the file of doc.go line 65, the value name p is error, in fact, it is producer. HOT 2
- Disconnects seem to be quite ungraceful HOT 2
- "go test" fails with "connection refused" HOT 2
- Client doesn't know it's disconnected HOT 2
- Panic in producer's router HOT 2
- Conn cannot execute multiple subscribe commands HOT 1
- error connecting to nsqd - dial tcp 127.0.0.1:4150: connect: connection refused? HOT 1
- An Example of multit-hreaded nsq consuming messages HOT 1
- producer: HTTP response to IDENTIFY causes memory allocation of over 1GB HOT 2
- how to clear data in nsq HOT 1
- MaxAttempts Callback 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 go-nsq.