Skip to content

How about error propagation from the publisher? #154

@artembilan

Description

@artembilan

Is your feature request related to a problem? Please describe.

Right now the code is like this in the AmqpPublisher.publish():

 .handleAsync( (t, ex) -> { Status status; if (ex == null) { status = mapDeliveryState(t.remoteState()); } else { status = Status.REJECTED; } DefaultContext defaultContext = new DefaultContext(message, status); this.metricsCollector.publishDisposition(mapToPublishDisposition(status)); callback.handle(defaultContext); return null; }, this.executorService); 

And when I deal with that in my code, I cannot understand the reason of non-accepted status.

Describe the solution you'd like

Any chances that the ex argument is added to the DefaultContext?
This way I could easily populate my CompletableFuture and propagate it up to the end-user.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions