Criei tudo certinho, conectei a instancia e ativei o Rabbit para alguns eventos. Os eventos começam a chegar e tudo certo, funcionando e tal.
Até que em algum momento novos eventos param de chegar.
Olho no RabbitMQ Management e parece estar tudo ok, e confirmo que as filas NÃO estão mais recebendo itens novos, xxx.messages.upsert fica zerada por exemplo, mesmo recebendo mensagens.
Com isso tudo deixa de funcionar, uma vez que escuto as mensagems pelo Rabbit.
🙏🙏🙏
Gostaria muito da ajuda de vocês para entender que comportamento é esse, e como contornar.
As vezes reinicio tudo e volta, mas não consegui identificar a causa, e com isso fico "vendido" aqui. Hoje em específico, não está voltando de jeito nenhum.
Investigação
Os logs do docker indicam que a mensagem chega (log abaixo), mas não fala nada de Rabbit. Olhando logs mais antigo vejo um WAStartupService.sendData-RabbitMQ, mas quando para de funcionar esse log não é apresentado.
Os logs do Rabbit em si não indicam nada de anormal
Logs
Logs do docker de mensagem sendo recebida:
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Listening event: messages.upsert
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Event received: messages.upsert
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 LOG [WAStartupService] [object]
{
key: {
remoteJid: '553288735683@s.whatsapp.net',
fromMe: false,
id: '3A487CCC50B3C0D8925F',
participant: undefined
},
pushName: 'Tiago Gouvêa',
message: {
conversation: 'teste',
messageContextInfo: MessageContextInfo {
deviceListMetadata: [DeviceListMetadata],
deviceListMetadataVersion: 2
}
},
contextInfo: undefined,
messageType: 'conversation',
messageTimestamp: 1714228980,
owner: 'tiago-dev',
source: 'ios'
}
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Sending data to webhook in event MESSAGES_UPSERT
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting instance name
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth in db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Inserting message in database
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [MessageRepository] [string] inserting messages
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [MessageRepository] [string] saving messages to db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Listening event: chats.update
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Event received: chats.update
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Sending data to webhook in event CHATS_UPDATE
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting instance name
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth in db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Listening event: contacts.update
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Event received: contacts.update
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Verifying if contacts exists in database to update
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Creating jid with number: 553288735683@s.whatsapp.net
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Number already contains @g.us or @s.whatsapp.net or @lid
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting profile picture with jid: 553288735683@s.whatsapp.net
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting profile picture url
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [MessageRepository] [string] messages saved to db: 1 messages
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Verifying contact from message
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [ContactRepository] [string] finding contacts
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [ContactRepository] [string] finding contacts in db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Creating jid with number: 553288735683@s.whatsapp.net
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Number already contains @g.us or @s.whatsapp.net or @lid
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting profile picture with jid: 553288735683@s.whatsapp.net
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting profile picture url
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Sending data to webhook in event CONTACTS_UPDATE
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting instance name
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth in db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Updating contacts in database
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [ContactRepository] [string] updating contacts
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [ContactRepository] [string] updating contacts in db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [ContactRepository] [string] contacts updated in db: 0 contacts
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Contact found in database
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Creating jid with number: 553288735683@s.whatsapp.net
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Number already contains @g.us or @s.whatsapp.net or @lid
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting profile picture with jid: 553288735683@s.whatsapp.net
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting profile picture url
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Event received: chats.update, messages.upsert
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Finding settings
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting instance name
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [SettingsRepository] [string] finding settings
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [SettingsRepository] [string] finding settings in db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Settings url: false
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Settings msg_call:
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Settings groups_ignore: true
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Settings always_online: false
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Settings read_messages: false
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Settings read_status: false
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Settings sync_full_history: false
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Listening event: messages.upsert
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Event received: messages.upsert
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 LOG [WAStartupService] [object]
{
key: {
remoteJid: '55329xxx5@s.whatsapp.net',
fromMe: true,
id: '3A487CCC50B3C0D8925F',
participant: undefined
},
pushName: 'Tiago Gouvêa',
message: { conversation: 'teste' },
contextInfo: undefined,
messageType: 'conversation',
messageTimestamp: 1714228980,
owner: 'tiago-gouvea',
source: 'ios'
}
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Sending data to webhook in event MESSAGES_UPSERT
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Getting instance name
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [AuthRepository] [string] finding auth in db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Inserting message in database
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [MessageRepository] [string] inserting messages
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [MessageRepository] [string] saving messages to db
[Evolution API] v1.7.1 1 - Sat Apr 27 2024 11:43:00 VERBOSE [WAStartupService] [string] Listening event: chats.update
....
Criei tudo certinho, conectei a instancia e ativei o Rabbit para alguns eventos. Os eventos começam a chegar e tudo certo, funcionando e tal.
Até que em algum momento novos eventos param de chegar.
Olho no RabbitMQ Management e parece estar tudo ok, e confirmo que as filas NÃO estão mais recebendo itens novos,
xxx.messages.upsert
fica zerada por exemplo, mesmo recebendo mensagens.Com isso tudo deixa de funcionar, uma vez que escuto as mensagems pelo Rabbit.
🙏🙏🙏
Gostaria muito da ajuda de vocês para entender que comportamento é esse, e como contornar.
As vezes reinicio tudo e volta, mas não consegui identificar a causa, e com isso fico "vendido" aqui. Hoje em específico, não está voltando de jeito nenhum.
Investigação
Os logs do docker indicam que a mensagem chega (log abaixo), mas não fala nada de Rabbit. Olhando logs mais antigo vejo um
WAStartupService.sendData-RabbitMQ
, mas quando para de funcionar esse log não é apresentado.Os logs do Rabbit em si não indicam nada de anormal
Logs
Logs do docker de mensagem sendo recebida:
Alguém pode me dar uma luz do que conferir?
Agradeço imensamente.