-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Getting "Result is already complete" exceptions when publishing messages over event bus #4922
Comments
This happens only when using a producer instead of invoking I see two options:
My preference goes to (2) because the information conveyed by the future result is not reliable in this case anyway. Thoughts @vietj ? |
we should define what means success or failure for publishing messages, perhaps it just means always success as you said with (2) |
Actually, a combination of the two would be best |
See eclipse-vertx#4922 When publishing, the OutboundDeliveryContext (promise) can be completed or failed several times. This leads to confusing exceptions in application logs. The promise should be completed with tryFail/tryComplete to avoid redundant exceptions. Besides, the MessageProducer write future behavior should be clarified. The returned Future completion depends on the producer type: - send or request: the future is completed successfully if the message has been written; otherwise, the future is failed - publish: the future is failed if there is no recipient; otherwise, the future is completed successfully In any case, a successfully completed Future is not a delivery guarantee. Signed-off-by: Thomas Segismont <[email protected]>
See #4922 When publishing, the OutboundDeliveryContext (promise) can be completed or failed several times. This leads to confusing exceptions in application logs. The promise should be completed with tryFail/tryComplete to avoid redundant exceptions. Besides, the MessageProducer write future behavior should be clarified. The returned Future completion depends on the producer type: - send or request: the future is completed successfully if the message has been written; otherwise, the future is failed - publish: the future is failed if there is no recipient; otherwise, the future is completed successfully In any case, a successfully completed Future is not a delivery guarantee. Signed-off-by: Thomas Segismont <[email protected]>
See #4922 When publishing, the OutboundDeliveryContext (promise) can be completed or failed several times. This leads to confusing exceptions in application logs. The promise should be completed with tryFail/tryComplete to avoid redundant exceptions. Besides, the MessageProducer write future behavior should be clarified. The returned Future completion depends on the producer type: - send or request: the future is completed successfully if the message has been written; otherwise, the future is failed - publish: the future is failed if there is no recipient; otherwise, the future is completed successfully In any case, a successfully completed Future is not a delivery guarantee. Signed-off-by: Thomas Segismont <[email protected]>
Fixed by 0b0e51b |
Version
Vert.x 4.4.6
Context
I have a set of verticles in a cluster (each on their own server), using Hazelcast as the cluster implementation. There's a singleton class that does this in its constructor:
The
receivedRemoteUpdate()
method doesn't do anything interesting in terms of Vert.x event bus, it just accepts the message and parses it:When there is something to publish about, the code does this:
Sometimes (not always), after I see the
info
log line, I get this error in the logs:Do you have a reproducer?
I do not have a rerproducer
Extra
The code in question is running using the Amazon Corretto JDK 21 container on AWS Fargate.
The text was updated successfully, but these errors were encountered: