Not receiving data

Hi I have two microsservices connected each other , one is using nodejs and the other is java spring boot , for nodejs i’m using axon-client package , and when I subscribe to the command that java spring send to me , the java app can’t see the returned data sent by me above this text i’ll show how I’m doing the things , exists some resolution for this , at all thanks and I hope some feedback from the forum .

import { AxonClient } from 'axon-client'
import { listarEvento } from '../eventos/eventos.services'

const clientAxon = new AxonClient({
  componentName: 'serviço_eventos',
  host: '192.168.10.248',
  port: 8124
})

interface IVerificarEstadoEventoComando {
  aggregateEventoId: string
  eventoId: string
  pedidoId: string
}

export async function startAxon (): Promise<void> {
  clientAxon.connect().then((valor: AxonClient) => {
    console.log('Axon conectado com sucesso ')
    valor.commandBus.subscribe('com.pro_it_consulting.co.ao.commonservice.comando.VerificarEstadoEventoComando', async (val: IVerificarEstadoEventoComando) => {
      console.log(val)
      // await valor.commandBus.dispatch({ name: 'com.pro_it_consulting.co.ao.commonservice.comando.VerificarEstadoEventoComando', payload: { data: val, type: 'command' } })
      const evento = await listarEvento(val.eventoId)
      if (evento.retorno.data == null) {
        // erro aqui
        await valor.commandBus.dispatch({ name: 'com.pro_it_consulting.co.ao.commonservice.comando.CancelarPedidoComando', payload: { data: { pedidoId: val.pedidoId, razaoRejeicao: 'Certifique-se que escolheu o evento correto' }, type: 'command' } })
        return
      }
      const toSend = {
        aggregateEventoId: val.aggregateEventoId,
        eventoId: evento.retorno.data.idDoEvento,
        nomeEvento: evento.retorno.data.nomeDoEvento,
        pedidoId: val.pedidoId,
        organizadorId: evento.retorno.data.organizador.organizadorId,
        nomeOrganizador: `${evento.retorno.data.organizador.primeiroNome} ${evento.retorno.data.organizador.sobrenome}`,
        estadoEvento: evento.retorno.data.estado
      }
      await valor.commandBus.dispatch({ name: 'com.pro_it_consulting.co.ao.commonservice.evento.VerificarEstadoEventoEvento', payload: { data: toSend, type: 'event' } })
      return toSend
    }, '')
  })
}

Hi @joel201114, and welcome to the forum!

The axon-client you are referring to is not a managed project by AxonIQ…

That doesn’t mean you cannot post your question, of course.
It simply means it makes a reply potentially tougher to formulate.

By looking at the referred package, you can see it’s from everweij (Erik Verweij) · GitHub.
The project you’re using specifically is the axon-client repository (of course).

Have you tried the steps described in that project’s readme?
I do hope they help you further, Joel!