A common gotcha with JBI is not completing a message exchange. To make it simpler to use we have a helper method on PojoSupport/ComponentSupport and on the Client API called

done(exchange)

which completes a message exchange. The long hand way to do this is this code

exchange.setStatus(ExchangeStatus.DONE);
getDeliveryChannel().send(exchange);

There are similar helper methods for

Fault fault = ...
fail(exchange, fault)
Exception error = ...
fail(exchange, error)
  • No labels