Add consumer attribute
Fixing bugs from tests
Move with_in_memory_connection to utils
Add more tests for dAgent