-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Describe the bug
defaultRetentionTimeInMinutes
from standalone.conf
doesn't affect to the real behavior
But bin/pulsar-admin namespaces set-retention public/default --size -1 --time -1
works fine
To Reproduce
Steps to reproduce the behaviour:
- mount volume in
docker-compose.yaml
file'docker/pulsar/conf/standalone.conf:/pulsar/conf/standalone.conf'
and set retention policy
defaultRetentionTimeInMinutes=-1
defaultRetentionSizeInMB=-1
- execute
docker-compose.yaml
with standalone optioncommand: bash -c "bin/pulsar standalone"
- check variables
bin/pulsar-admin namespaces get-retention public/default
{
"retentionTimeInMinutes" : -1,
"retentionSizeInMB" : -1
}
-
send message "test" to public/default/my-topic
-
create reader from public/default/my-topic
-
message is there
-
wait about 3 minutes and read again
-
the topic is empty
-
stop
docker-compose.yaml
and clean volumes -
execute
docker-compose.yaml
again -
set retention policy through pulsar-admin
bin/pulsar-admin namespaces set-retention public/default --size -1 --time -1
-
check variables
bin/pulsar-admin namespaces get-retention public/default
{
"retentionTimeInMinutes" : -1,
"retentionSizeInMB" : -1
}
- send message "test" to public/default/my-topic
- create reader from public/default/my-topic
- message is there
- wait about 3 minutes and read again
- message is still there
Expected behavior
The message should be in topic after 2 minutes when defaultRetentionTimeInMinutes=-1
configured in standalone.conf
Desktop (please complete the following information):
- OS: Official docker 2.4.0
Additional context
docker-compose.yaml
version: '3'
services:
zookeeper:
container_name: zookeeper
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
volumes:
- './docker/zookeeper/data:/var/lib/zookeeper/data'
- './docker/zookeeper/log:/var/lib/zookeeper/log'
pulsar:
container_name: pulsar
hostname: pulsar
ports:
- '6650:6650'
- '9000:8080'
volumes:
- './docker/pulsar/data:/pulsar/data'
- './docker/pulsar/conf/standalone.conf:/pulsar/conf/standalone.conf'
depends_on:
- zookeeper
image: 'apachepulsar/pulsar:2.4.0'
command: bash -c "bin/pulsar standalone"
pulsar-dashboard:
container_name: pulsar-dashboard
image: apachepulsar/pulsar-dashboard
ports:
- '9001:80'
environment:
SERVICE_URL: http://pulsar:9000
depends_on:
- pulsar