Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用户上线下线怎么配置? #37

Open
lolkt opened this issue Dec 24, 2018 · 0 comments
Open

用户上线下线怎么配置? #37

lolkt opened this issue Dec 24, 2018 · 0 comments

Comments

@lolkt
Copy link

lolkt commented Dec 24, 2018

UserStatusChangeListener如何使用... 前端开发的求教

`public class UserStatusChangeListener implements MQMessageReceiver {

private static final Logger LOGGER = LoggerFactory.getLogger(com.mpush.client.user.UserStatusChangeListener.class);

//只需要一台机器注册online、offline 消息通道
public UserStatusChangeListener() {
    MQClientFactory.create().subscribe(ONLINE_CHANNEL, this);
    MQClientFactory.create().subscribe(OFFLINE_CHANNEL, this);
}

@Override
public void receive(String channel, Object message) {
    LOGGER.info("  UserStatusChangeListener   " + channel + "       " + message);
}

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant