Commit f1e9e6bb authored by chenkai's avatar chenkai

throw exception

parent efa9a187
......@@ -112,7 +112,9 @@ public class MQSender {
channel = channelPool.borrowObject();
channel.basicPublish(exchangeName, "qunar_baitiaodebt", false, false,
PROPERTIES, content.getBytes("utf8"));
} finally {
} catch (Exception e) {
throw e;
}finally {
if (channel != null) {
channelPool.returnObject(channel);
}
......@@ -130,6 +132,8 @@ public class MQSender {
channel = channelPool.borrowObject();
channel.basicPublish(exchangeName, "confirmable", false, false,
PROPERTIES, messageStr.getBytes("utf8"));
} catch (Exception e){
throw e;
} finally {
if (channel != null) {
channelPool.returnObject(channel);
......@@ -145,7 +149,9 @@ public class MQSender {
channel = channelPool.borrowObject();
channel.basicPublish(exchangeName, "confirm", false, false,
PROPERTIES, message.getBytes("utf8"));
} finally {
} catch (Exception e){
throw e;
}finally {
if (channel != null) {
channelPool.returnObject(channel);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment