| | |
| | | Topic_Event = "event" //事件消息 |
| | | ) |
| | | |
| | | func NewPublisher(url string,mode int) (PubSub,error) { |
| | | return newPub(url) |
| | | func NewPublisher(url string,heartBeatUrl string,mode int) (PubSub,error) { |
| | | return newPub(url,heartBeatUrl) |
| | | } |
| | | |
| | | func NewSubscriber(url string,mode int,topics []string) (PubSub,error) { |
| | | return newSub(url, topics) |
| | | //processId is process Identifier,unique |
| | | func NewSubscriber(url string,heartBeatUrl string,mode int,topics []string,processId string) (PubSub,error) { |
| | | return newSub(url,heartBeatUrl, topics, processId) |
| | | } |