extracting a spark_rabbitmq as a ejabberd module