class MqResource implements IMqResource {

	public long register(ConsumerRegisterRequest request) {
		if (request == null) {
			return 0;
		}
		String url = MqConstanst.CONSUMERPRE + "/register";
		ConsumerRegisterResponse response = null;
		try {
			response = post(request, url, 10, ConsumerRegisterResponse.class, true);
			if (response != null && !Util.isEmpty(response.getMsg())) {
				logger.warn(response.getMsg());
			}
		} catch (Exception e) {
			CatRequest request2 = new CatRequest();
			request2.setMethod("register");
			request2.setJson(JsonUtil.toJson(request));
			request2.setMsg(e.getMessage());
			addCat(request2);
			throw new RuntimeException(request.getName() + "注册失败," + e.getMessage() + "！");
		}
		return response.getId();
	}

	public  MqResource(String url, long connectionTimeOut, long readTimeOut);
	public  MqResource(IHttpClient httpClient, String url);

}