szkoludasebastian commented on issue #22709:
URL: https://github.com/apache/pulsar/issues/22709#issuecomment-2111952566

   We use pulsar client version: 3.2.2 
(org.apache.pulsar:pulsar-client-api:3.2.2).
   
   When I say that message was sent correctly I mean that we use something like 
this:
   ```
   public CompletableFuture<Response> sendMessage(Request request) {
            return producer.newMessage()
                               .value(request.getPayload())         
                            .sendAsync()
                            .thenApply(messageId -> ok(request))
                            .exceptionallyCompose(ex -> 
createErrorResponse(request, ex));
       }
   ```
   so we are creating message based on websocket request, then we use 
sendAsync() and we use thenApply() to return ok response. When any exception 
appears then we use exceptionallyCompose() and we return error response.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to