Index: /trunk/changelog
===================================================================
--- /trunk/changelog	(revision 98)
+++ /trunk/changelog	(revision 98)
@@ -0,0 +1,4 @@
+0.5.6
+-----
+Broker's channel synchronized. When the broker's channel gets closed it will be detected and a new one will be created.
+It only shows an error log with the information.
Index: /trunk/pom.xml
===================================================================
--- /trunk/pom.xml	(revision 97)
+++ /trunk/pom.xml	(revision 98)
@@ -4,5 +4,5 @@
 	<groupId>objectmq</groupId>
 	<artifactId>objectmq</artifactId>
-	<version>0.5.5</version>
+	<version>0.5.6</version>
 	<name>objectmq</name>
 	<description>Middleware based on AMQP</description>
Index: /trunk/src/main/java/omq/client/proxy/MultiProxymq.java
===================================================================
--- /trunk/src/main/java/omq/client/proxy/MultiProxymq.java	(revision 97)
+++ /trunk/src/main/java/omq/client/proxy/MultiProxymq.java	(revision 98)
@@ -55,5 +55,5 @@
 
 		byte[] bytesRequest = serializer.serialize(serializerType, request);
-		broker.getChannel().basicPublish(exchange, routingkey, props, bytesRequest);
+		broker.publishMessge(exchange, routingkey, props, bytesRequest);
 
 		logger.debug("Proxymq: " + uid + " invokes " + methodName + ", corrID" + corrId + ", exchange: " + exchange + ", replyQueue: " + replyQueueName
Index: /trunk/src/main/java/omq/client/proxy/Proxymq.java
===================================================================
--- /trunk/src/main/java/omq/client/proxy/Proxymq.java	(revision 97)
+++ /trunk/src/main/java/omq/client/proxy/Proxymq.java	(revision 98)
@@ -165,5 +165,5 @@
 		// Publish the message
 		byte[] bytesRequest = serializer.serialize(serializerType, request);
-		broker.getChannel().basicPublish(exchange, routingkey, props, bytesRequest);
+		broker.publishMessge(exchange, routingkey, props, bytesRequest);
 		logger.debug("Proxymq: " + uid + " invokes '" + request.getMethod() + "' , corrID: " + corrId + ", exchange: " + exchange + ", replyQueue: "
 				+ replyQueueName + ", serializerType: " + serializerType + ", multi call: " + request.isMulti() + ", async call: " + request.isAsync()
Index: /trunk/src/main/java/omq/common/broker/Broker.java
===================================================================
--- /trunk/src/main/java/omq/common/broker/Broker.java	(revision 97)
+++ /trunk/src/main/java/omq/common/broker/Broker.java	(revision 98)
@@ -27,4 +27,5 @@
 import com.rabbitmq.client.Connection;
 import com.rabbitmq.client.QueueingConsumer;
+import com.rabbitmq.client.AMQP.BasicProperties;
 import com.rabbitmq.client.QueueingConsumer.Delivery;
 import com.rabbitmq.client.ShutdownListener;
@@ -125,5 +126,5 @@
 	 * @throws Exception
 	 */
-	public Channel getChannel() throws Exception {
+	public synchronized Channel getChannel() throws Exception {
 		return channel;
 	}
@@ -135,6 +136,17 @@
 	 * @throws IOException
 	 */
-	public Channel getNewChannel() throws IOException {
+	public synchronized Channel getNewChannel() throws IOException {
 		return connection.createChannel();
+	}
+
+	/**
+	 * 
+	 */
+	public synchronized void publishMessge(String exchange, String routingKey, BasicProperties props, byte[] bytesRequest) throws IOException {
+		if (!channel.isOpen()) {
+			logger.error("Broker's channel is closed opening a new one", channel.getCloseReason());
+			channel = getNewChannel();
+		}
+		channel.basicPublish(exchange, routingKey, props, bytesRequest);
 	}
 
