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

Clarify MessageProducer write future behavior #4935

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

tsegismont
Copy link
Contributor

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.

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]>
@tsegismont tsegismont requested a review from vietj November 8, 2023 17:33
@tsegismont tsegismont merged commit 4fbfe00 into eclipse-vertx:master Nov 9, 2023
6 checks passed
@tsegismont tsegismont deleted the issue-4922 branch November 9, 2023 09:14
tsegismont added a commit that referenced this pull request Nov 9, 2023
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]>
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

Successfully merging this pull request may close these issues.

2 participants