1. AsyncTaskService client = new AsyncHornetQTaskClient();
client.connect("127.0.0.1", 5445);
This is an Async Client, if you are using hornetQ that's probably what you want to have.
2. TaskService client = new SyncTaskServiceWrapper(new AsyncHornetQTaskClient());
client.connect("127.0.0.1", 5445);
THis is the same but wrapped by a layer which abstract the async behaviour of HornetQ, it's up to you. Look at the methods that are exposed.
For the AsyncTaskService you will need to provide a handler that will be called when you receive a response. The SyncWrapper hide those handlers.
About the expcetion:
String name = "client 1" ++UUID.randomUUID();
TaskClient client = new TaskClient(new HornetQTaskClientConnector(name, new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
Are you creating too much clients? When are you creating them? you should close them, if you are not using them anymore or reuse them.