Shawyeok opened a new issue, #23800:
URL: https://github.com/apache/pulsar/issues/23800

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Read release policy
   
   - [X] I understand that unsupported versions don't get bug fixes. I will 
attempt to reproduce the issue on a supported version of Pulsar client and 
Pulsar broker.
   
   
   ### Version
   
   2.11+
   
   ### Minimal reproduce step
   
   ```java
       @Test
       public void testProducerInterceptorAccessMessageValue() throws 
PulsarClientException {
           List<String> messageValueOnSendAcknowledgement = 
Collections.synchronizedList(new ArrayList<>());
           ProducerInterceptor<String> interceptor = new 
ProducerInterceptor<>() {
               @Override
               public void close() {
               }
   
               @Override
               public Message<String> beforeSend(Producer<String> producer, 
Message<String> message) {
                   return message;
               }
   
               @Override
               public void onSendAcknowledgement(Producer<String> producer, 
Message<String> message, MessageId msgId,
                                                 Throwable exception) {
                   messageValueOnSendAcknowledgement.add(message.getValue());
               }
           };
           @Cleanup
           Producer<String> producer = pulsarClient.newProducer(Schema.STRING)
                   .topic("persistent://my-property/my-ns/my-topic")
                   .intercept(interceptor)
                   .create();
   
           final String messageValue = UUID.randomUUID().toString();
           try {
               producer.newMessage().value(messageValue).send();
           } catch (Exception ignore) {
           }
           Assert.assertEquals(messageValueOnSendAcknowledgement.size(), 1);
           Assert.assertEquals(messageValueOnSendAcknowledgement.get(0), 
messageValue);
       }
   ```
   
   ### What did you expect to see?
   
   Return message value properly
   
   ### What did you see instead?
   
   Empty message returned
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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