简体   繁体   English

在将消息添加到jms队列之前,如何从ESB向发件人发送响应

[英]how to send response to a sender from ESB before adding message to a jms queue

I have a requirement, where I am getting requests from ESB api and using ESB sequencing through restfull tomcat endpoints I am validating the request and then sending it to the JMS queue, 我有一个要求,我要从ESB api获取请求,并通过restfull tomcat端点使用ESB排序,我要验证请求,然后将其发送到JMS队列,

This is working fine but i also want to send the response to the sender, if the validation fails in restfull tomcat endpoint. 这工作正常,但如果在restfull Tomcat端点中验证失败,我也想将响应发送给发件人。 Since the validation fails the message does not get delivered to the queue and gets dropped there. 由于验证失败,因此消息不会传递到队列,也不会被丢弃。

Request Flow, 请求流程

Sender -> 
    ESB API -> 
        ESB sequence -> 
               tomcat validation endpoint -> 
                                    ESB sequence -> 
                                            AddressEndpoint for JMS queue.

Here, at "tomcat validation endpoint ->" if the validation is success the flow should continue to "AddressEndpoint for JMS queue." 在这里,在“ tomcat验证端点->”处,如果验证成功,则流程应继续到“ JMS队列的AddressEndpoint”。 at the same time it should acknowledge the sender that the message was success. 同时,它应该确认发件人消息成功。

Is it possible? 可能吗?

Please suggest, the sender presently does not get notified if the message reached the queue or got dropped at tomcat endpoint in the esb sequence. 请建议,如果消息到达队列或在esb序列中的tomcat端点被丢弃,当前不会通知发送者。

当您从tomcat验证端点收到响应时,将执行outSequence或faultSequence,具体取决于端点是否可访问等。在这些序列中,您可以根据需要克隆响应,并在一个目标中将消息发送到JMS队列。另一方面,您将响应发送给呼叫者

就像让·米歇尔(Jean-Michel)所说的,您可以使用克隆介体,并使用RESPONDSEND介体将消息的副本发送到JMS,将另一个副本发送给调用方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM