Update module.py

add routing key resource only if source_type is resource