I'm trying to execute a longer task with celery, so to test I made a sample task sleep for 5 minutes and set the rabbitmq.conf
file with a single line containing consumer_timeout = 10000
expecting the task to fail with precondition error after 10seconds(or at least after 60 seconds as per this answer), but it never did. The task completes after 5mins.
I can see the rabbitmq.conf file shows up on top of logs(which I think it means it loaded the file successfully??)
main_rabbitmq | Config file(s): /etc/rabbitmq/rabbitmq.conf
main_rabbitmq | /etc/rabbitmq/conf.d/10-default-guest-user.conf
My Dockerfile:
FROM rabbitmq:3.9.13-management
# Define environment variables.
ENV RABBITMQ_USER user
ENV RABBITMQ_PASSWORD password
ENV RABBITMQ_PID_FILE /var/lib/rabbitmq/mnesia/rabbitmq
COPY ./myrabbit.conf /etc/rabbitmq/rabbitmq.conf
ADD init.sh /init.sh
RUN chmod +x /init.sh
# Define default command
CMD ["/init.sh"]
The init.sh file is similar to this.