J'ai créé un canal de contrôle et un service de passerelle pour envoyer un message de contrôle à ce canal. Cependant, après avoir appelé la méthode de service de passerelle supposée renvoyer boolean, elle ne revient pas après la soumission du message.Spring Integration Gateway Méthode de service ne retournant pas au démarrage/à l'arrêt
Code Snippet:
public interface SampleControlService {
boolean sendControl(String message);
}
....
@Autowired
private SampleControlService sampleControlService;
.....
boolean done = sampleControlService.sendControl("@testAdapter.stop()"); // message gets sent but it is not returning to caller
System.out.println("Done : " + done); // this line doesn't execute
// integration config
<int:channel id="controlChannel"/>
<int:gateway service-interface="com.test.service.SampleControlService" default-request-channel="controlChannel" />
<int:control-bus input-channel="controlChannel"/>
Cependant, si j'envoie un message @ testAdapter.isRunning() pour vérifier l'état, il revient comme prévu.
merci, ajouté la nouvelle méthode. – zdesam