Getting broker name in WM6

In ES 4.6 we had a need to get the broker name inside an integration, so we could determine if we were in Dev Prototype or Production environment. We did this because when we wrote to the file system, we would write to a different directory depending on the which environment. The way we accomplished this in ES 4.6 was:

BrokerClient bc = access.getClient();
String brokerName = bc.getBrokerName();

Then we would build a directory path based on that. ES provided the field access, which I believe is the event (not sure about that). But it worked!

Now, in wm6, how can I find out what broker I am getting documents from? I know the getBrokerName API still exists, but I can’t seem to figure out how to get the current broker client.

There is a service in WmRoot you may find useful: