How to Subscribe to all topic form mqtt java client

Hi I have implemented Simple Mqtt Java Client I want that this client can subscribe to all topics.
I have implemented event bus for sending message
topic in event bus is like :-
home/out/${item}/command

How can I subscribe to all topics ?

home/out/#
home/#
at all for everything: #

This is getting me error like

Exception in thread “main” java.lang.IllegalArgumentException: The topic name MUST NOT contain any wildcard characters (#+)
at org.eclipse.paho.client.mqttv3.MqttTopic.validate(MqttTopic.java:203)
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.getTopic(MqttAsyncClient.java:747)
at org.eclipse.paho.client.mqttv3.MqttClient.getTopic(MqttClient.java:482)
at mqttClient.mqttClient.JioSmartHomeMqttClient.runClient(JioSmartHomeMqttClient.java:93)
at mqttClient.mqttClient.JioSmartHomeMqttClient.main(JioSmartHomeMqttClient.java:58)

show the code where you are subscribing

package mqttClient.mqttClient;

import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.MqttTopic;

public class JioSmartHomeMqttClient implements MqttCallback {

MqttClient mqttClient;
MqttConnectOptions connOpt;

static final String BROKER_URL = "tcp://localhost:1883";
// static final String M2MIO_DOMAIN = "<Insert m2m.io domain here>";
static final String M2MIO_STUFF = "things";
static final String M2MIO_THING = "<Unique device ID>";
// static final String M2MIO_USERNAME = "<m2m.io username>";
// static final String M2MIO_PASSWORD_MD5 = "<m2m.io password (MD5 sum of
// password)>";

// the following two flags control whether this example is a publisher, a
// subscriber or both
static final Boolean subscriber = false;
static final Boolean publisher = false;

public void connectionLost(Throwable arg0) {
	// TODO Auto-generated method stub
	System.out.println("Connection Lost");

}

public void deliveryComplete(IMqttDeliveryToken arg0) {
	// TODO Auto-generated method stub
	System.out.println("Delivery Complete");

}

public void messageArrived(String arg0, MqttMessage arg1) throws Exception {
	// TODO Auto-generated method stub
	System.out.println("-------------------------------------------------");
	System.out.println("| Topic:" + arg0);
	System.out.println("| Message: " + new String(arg1.getPayload()));
	System.out.println("-------------------------------------------------");

}

/**
 * 
 * MAIN
 * 
 */
public static void main(String[] args) {

	// TODO Auto-generated method stub
	JioSmartHomeMqttClient smc = new JioSmartHomeMqttClient();
	smc.runClient();

}

/**
 * 
 * runClient The main functionality of this simple example. Create a MQTT
 * client, connect to broker, pub/sub, disconnect.
 * 
 */
public void runClient() {
	// setup MQTT Client
	String clientID = M2MIO_THING;
	connOpt = new MqttConnectOptions();

	connOpt.setCleanSession(true);
	connOpt.setKeepAliveInterval(30);
	// connOpt.setUserName(M2MIO_USERNAME);
	// connOpt.setPassword(M2MIO_PASSWORD_MD5.toCharArray());

	// Connect to Broker
	try {
		mqttClient = new MqttClient(BROKER_URL, clientID);
		mqttClient.setCallback(JioSmartHomeMqttClient.this);
		mqttClient.connect(connOpt);

	} catch (MqttException e) {
		e.printStackTrace();
		System.exit(-1);
	}

	System.out.println("Connected to " + BROKER_URL);

	// setup topic
	// topics on m2m.io are in the form <domain>/<stuff>/<thing>
	String myTopic = "#";
	MqttTopic topic = mqttClient.getTopic(myTopic);

	// subscribe to topic if subscriber
	if (subscriber) {
		try {
			int subQoS = 0;
			mqttClient.subscribe(topic.getName(), subQoS);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	// publish messages if publisher
	if (publisher) {
		for (int i = 1; i <= 10; i++) {
			String pubMsg = "{\"pubmsg\":" + i + "}";
			int pubQoS = 0;
			MqttMessage message = new MqttMessage(pubMsg.getBytes());
			message.setQos(pubQoS);
			message.setRetained(false);

			// Publish the message
			// System.out.println("Publishing to topic \"" + topic + "\" qos " + pubQoS);
			MqttDeliveryToken token = null;
			try {
				// publish message to broker
				// token = topic.publish(message);
				// Wait until the message has been delivered to the broker
				token.waitForCompletion();
				Thread.sleep(100);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}

	// disconnect
	try {
		// wait to ensure subscribed messages are delivered
		if (subscriber) {
			Thread.sleep(5000);
		}
		mqttClient.disconnect();
	} catch (Exception e) {
		e.printStackTrace();
	}
}

}

I am using ecliple paho library, In getTopic() method while valadating topic , allow wildcard characeters flag is fasle that is why I am getting this above error

MqttTopic	getTopic(java.lang.String topic)
Get a topic object which can be used to publish messages.

Are you sure you are signing and not publishing?
Do you have the same?

I am not publishing it, I am only Subscribing it.

note, it says here, is used for publication.
I’m not familiar with Java, the last thing I can recommend, try the following:

mqttClient.subscribe(myTopic, subQoS);