CritasWang commented on code in PR #15523:
URL: https://github.com/apache/iotdb/pull/15523#discussion_r2094803339


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/mqtt/LinePayloadFormatter.java:
##########
@@ -63,7 +64,7 @@ public LinePayloadFormatter() {
   }
 
   @Override
-  public List<Message> format(ByteBuf payload) {
+  public List<Message> format(String topic, ByteBuf payload) {

Review Comment:
   Since the topics can be obtained here, I think the logic for setting up the 
database should be included here
   
   ```
           if (useTableInsert) {
             TableMessage tableMessage = (TableMessage) message;
             // '/' previously defined as a database name
             String database =
                 !msg.getTopicName().contains("/")
                     ? msg.getTopicName()
                     : msg.getTopicName().substring(0, 
msg.getTopicName().indexOf("/"));
             tableMessage.setDatabase(database);
   ```



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