vert-x3 / vertx-tcp-eventbus-bridge

Apache License 2.0
50 stars 44 forks source link

No response when wrong format messages are sent to bridge #58

Closed gaol closed 3 years ago

gaol commented 3 years ago

Version

master branch

Context

If messages sent from client to bridge do not follow the defined format, client does not get any response.

Do you have a reproducer?

  @Test
  public void testSendPrimitive(final TestContext ctx) {
    final Async async = ctx.async();
    EventBusClient client = EventBusClient.tcp(baseOptions, new JacksonCodec());
    vertx.eventBus().consumer("server_addr", msg -> {
      ctx.assertEquals(new JsonObject().put("message", "hello").toString(), msg.body());
      client.close();
      async.complete();
    });
    JsonObject jsonObject = new JsonObject().put("message", "hello");
    String json = jsonObject.encode();
    client.send("server_addr", json);  // trying to send the Json format string to server
  }

the above test does not end.

nbrendah commented 3 years ago

@gaol @pmlopes, Is this issue still valid? Its like the corresponding issue in the client was closed. Could be that it was fixed and closed in the client but not here?

gaol commented 3 years ago

I think it was fixed by #62 , closing it.

nbrendah commented 3 years ago

Maybe @gaol, if you got some time off, i request you to kindly look into https://github.com/vert-x3/vertx-tcp-eventbus-bridge/pull/63 I read some thing like @pmlopes ain't available until Monday.

Since i am a newbie here, i might have messed out here or there. Looking forward to seeing your comments and suggestions. thanks and regards