docker-compose healthcheck for rabbitMQ
You could use the command rabbitmq-diagnostics -q ping in case you just need a basic check.
healthcheck:
  test: rabbitmq-diagnostics -q ping
  interval: 30s
  timeout: 30s
  retries: 3

More information on how to run more advanced health checks could be found here