/// <summary> /// 获取监听RoutingKey /// </summary> /// <returns></returns> private List <string> GetListeningRoutingKey(MqEnum mqEnum) { List <string> listRoutingKey = new List <string>(); switch (mqEnum) { case MqEnum.Fanout: listRoutingKey.Add("all"); break; case MqEnum.Topic: listRoutingKey.Add("*." + receiver); listRoutingKey.Add(role + ".*"); break; case MqEnum.Direct: listRoutingKey.Add(receiver); break; default: break; } return(listRoutingKey); }
public MqBuilder withType(MqEnum type = MqEnum.Topic) { this.type = type; return(this); }