wolfstudy commented on issue #4348: Support max message size for cpp and go 
client
URL: https://github.com/apache/pulsar/pull/4348#issuecomment-495283996
 
 
   All ci error. because the `maxMessageSize` is inline, i am not cpp expert. 
in my local `inline int maxMessageSize = Commands::DefaultMaxMessageSize;` can 
build success, but has a warning.
   
   In here, i want to use a `static` variable like Java, which is valid 
throughout the runtime. Static variables are stored in the constant pool, but 
it seems that static and Java in cpp are different. I have tried the following 
methods, can't work properly, only `inline` can achieve my purpose:
   
   - `int maxMessageSize = Commands::DefaultMaxMessageSize;`
   - `static int maxMessageSize = Commands::DefaultMaxMessageSize;`
   - `static volatile int maxMessageSize = Commands::DefaultMaxMessageSize;`
   
   so in cpp, what should be used elegantly to achieve this goal?
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to