k-pisey opened a new issue #11041:
URL: https://github.com/apache/pulsar/issues/11041


   **Describe the bug**
   
   Retention was configured via standalone config file but get retention via 
admin cli or rest api return null. 
   **Additional info**: It works as expected if setting retention via rest-api 
or admin cli.
   
   pulsar image
   ```
     pulsar:
       image: apachepulsar/pulsar:2.7.1
       container_name: twex-pulsar
       ports:
         - 8002:8080
         - 6650:6650
       command: >
         /bin/bash -c
         "bin/apply-config-from-env.py conf/standalone.conf
         && bin/pulsar standalone"
       environment:
         - BOOKIE_MEM=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g
         - PULSAR_MEM=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g
   #      - brokerDeleteInactiveTopicsEnabled=false
   #      - defaultRetentionTimeInMinutes=100
   #      - defaultRetentionSizeInMB=-1
   #      - ttlDurationDefaultInSeconds=500
       volumes:
         - ../twex/pulsar-conf/standalone.conf:/pulsar/conf/standalone.conf
   ```
   standalone.conf
   ```
   # Default message retention time
   defaultRetentionTimeInMinutes=10080
   
   # Default retention size
   defaultRetentionSizeInMB=-1
   ```
   
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. set retention values in standalone.conf
   2. start pulsar container
   3. get retention policies via admin cli or rest api
   4. get null
   
   **Expected behavior**
   A retention policies with given settings
   ```
   {
       "retentionTimeInMinutes": 10080,
       "retentionSizeInMB": -1
   }
   ```
   
   


-- 
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:
[email protected]


Reply via email to