I don't think the `publishMessage()`function actually returns anything. Do you need it to considering this is mentioned in the comment block for `message_broker_producer_request()` ...
```
  * @return
  *   A SimpleXML response object.
```

If you don't need this function to return an object, I'd instead just remove the `return` or change it to the following so that it's clear that we're not expecting `publishMessage()` to return anything.
```
$messageBroker->publishMessage($message);
return;
```