Skip to content

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

@lolkt

Description

@lolkt

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);
}

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions