You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/24 12:59:31 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #11743: [pulsar-client] Fix: set and return topic name on message api

eolivelli commented on a change in pull request #11743:
URL: https://github.com/apache/pulsar/pull/11743#discussion_r694825749



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/TypedMessageBuilderImpl.java
##########
@@ -284,7 +284,7 @@ public MessageMetadata getMetadataBuilder() {
 
     public Message<T> getMessage() {
         beforeSend();
-        return MessageImpl.create(msgMetadata, content, schema);
+        return MessageImpl.create(msgMetadata, content, schema, producer.topic);

Review comment:
       @Demogorgon314  I would use producer.getTopic() in order to ease mocking.
   also the producer field used to be `nullable` 
   this change is the cause of https://github.com/streamnative/kop/issues/677
   I am not sure that the KOP usage is correct, as it is using an internal API to build a message
   
   if we change to producer.getTopic(), will you be able to fix the KOP issue ?
   isn't there any other way of creating a Message without using the Builder ?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org