0

我有一个带有 2 个出站通道适配器的通道,它们都返回一个包含其活动结果的 Message 对象。这在升级到 SI 2.1 之前一直有效。现在,由于方法返回非空值,我收到一条错误消息。

这是一个代码示例:

<integration:gateway id="notificationGateway"
                     default-request-channel="notificationRecordsFetcher" 
                     default-reply-channel="notifySupplier"
                     service-interface="com.supplier.NotificationGateway"/>

<!-- Submit the file to the supplier-->
<integration:channel id="notifySupplier"/>

<!-- Handle the secured transfer (first) -->
<integration:outbound-channel-adapter order="1" channel="notifySupplier" id="SupplierSecuredFileTransfer" ref="SubmitToSupplier" method="submit" />

<!-- Delete the notification records marked as successful (second) -->
<integration:outbound-channel-adapter order="2" channel="notifySupplier" id="deleteNotificationRecords" ref="databaseService" method="removeNotificationEntries" />

标识为“SupplierSecuredFileTransfer”的适配器需要一堆 XML 文件,每个文件代表一个数据库记录,并使用 SFTP 将它们发送到目标文件夹。然后,它标记已成功传递的记录并将它们作为回复发送给标识为“deleteNotificationRecords”的第二个适配器,后者又读取第一个适配器更新的消息有效负载并对其执行。现在由于引入了新限制,我无法在适配器之间传递信息。任何想法如何克服这个问题?

4

1 回答 1

0

你是从哪个版本迁移过来的?

将 <outbound-channel-adapter/> 更改为 <service-activator/>,将 channel 更改为 input-channel 并将 output-channel 设置为“nullChannel”。

于 2012-04-09T15:06:51.960 回答