package com.iplatform.tcp.lb; import com.walker.push.rocketmq.tcp.MqResponse; import java.util.Map; public class MqResponseUtils { public static final MqResponse acquireMqResponse(Map map){ int retryTimes = Integer.parseInt(map.get("retryTimes").toString()); MqResponse mqResponse = new MqResponse(); mqResponse.setRetryTimes(retryTimes); mqResponse.setKey(map.get("key").toString()); mqResponse.setSource(map.get("source").toString()); mqResponse.setTopic(map.get("topic") != null? map.get("topic").toString() : ""); return mqResponse; } }