def _on_message_simple(client, userdata, message):
    """Internal callback"""
    if userdata['msg_count'] == 0:
        return
    if message.retain and not userdata['retained']:
        return
    userdata['msg_count'] = userdata['msg_count'] - 1
    if userdata['messages'] is None and userdata['msg_count'] == 0:
        userdata['messages'] = message
        client.disconnect()
        return
    userdata['messages'].append(message)
    if userdata['msg_count'] == 0:
        client.disconnect()
