Sigterm in Keda scaling

I am trying to implement Keda scaling in listener containers. Noticed that container is accepting new requests at termination period. Is there any way to close the RabbitMQ connection in termination period without breaking the current process?