cost 141 ms
如何以編程方式編寫 jdbc 入站通道適配器以從數據庫讀取數據並傳遞到 output 通道?

[英]How to write jdbc inbound channel adapter programmatically to read data from DB and pass to output channel?

我是 spring 集成的新手,我想以編程方式編寫以下流程我有下面的入站通道適配器,我在其中查詢數據庫並將其傳遞給 OutChannel,然后從 OutChannel 傳遞給 AccountOutputChannel。 AccountOutputChannel 具有 class 的引用,當消息在 ...

如何從 rest api 調用 Spring 通道適配器?

[英]How to invoke Spring channel adapter from rest api?

我是 Spring 集成的新手。 我有一個 JDBC 入站通道適配器,如下所示。 當 spring 引導應用程序在下面啟動時,適配器被調用並開始從 DB 讀取。 但我希望僅在調用 REST API 后調用下面 我無法理解如何僅在調用 generateFile API 后才開始從數據庫讀取我不知道如 ...

Spring 批量分區作業 JMS 確認

[英]Spring Batch partitioned job JMS acknowledgement

賞金將在 6 天后到期。 此問題的答案有資格獲得+100聲望賞金。 Arnold Galovics想讓更多人關注這個問題。 假設我有一個 Spring 批處理遠程分區作業,即我有一個啟動作業並對工作進行分區的管理器應用程序實例,並且我有多個正在執行各個分區的工作人員。 將分區發送給工作人員的消息 ...

Spring 中 SFTP 的請求-回復

[英]Request-reply for SFTP in Spring

我正在嘗試為 Spring 中的 SFTP 連接實現某種請求-回復功能。邏輯由以下部分組成: 准備文件通過 SFTP 發送文件暫停處理並等待文件響應(監聽相同的 SFTP 並超時) 一旦在 SFTP 上找到響應文件,停止監聽,傳輸文件,處理數據並恢復處理。 如果達到超時,處理應該在不對文件進行操作的 ...

Spring Jms inboundGateway 的集成默認響應

[英]Spring Integration Default Response for Jms inboundGateway

嘗試從下游調用為Jms inboundGateway異常發送默認構造的響應時看到以下exception 。 我們從ErrorMessage中提取failedMessage標頭,然后將構造的響應設置為payload 。 replyChannel標頭與最初記錄的message header匹配 代碼: ...

集成 spring 安全和 spring MVC 和 spring 相互集成

[英]integrate spring security and spring MVC and and spring integration with each other

我目前正在開發一個 web 站點,用於通過 spring 控制物聯網設備。 該應用程序基於 spring 啟動。 我通過從DataJpa擴展開發了 rest API 的大部分內容。 下一步,我必須在我的應用程序中實現 TCP 連接,經過一些研究后,我采用spring 集成來實現這一點,簡單的應用程序 ...

錯誤處理 - 在連接異常的情況下向 DLT 發送 protobuf 消息而不是重試

[英]Error Handling - protobuf message to DLT instead of Retry in case of connection exception

我已經使用 SpringBoot 2.7.6、Confluent 平台實現了 KafkaListener,現在我需要為其實現錯誤處理程序。 偵聽器設法獲取 protobuf 主題消息並將有效負載正確地發布到 HTTP 端點。 但是如果發生 java.net.ConnectException ,我需要 ...

Spring 集成 scatter gather 中的聚合響應

[英]Aggregate response in Spring integration scatter gather

我需要調用 3 個不同的 http 端點,這將返回相同的域 object,並在單個 object 中收集這 3 個不同的 http 端點的響應。我正在使用 Spring 散點收集模式相同,有點丟失如何聚合結果在單個 object 中。下面是我的分散收集配置文件: 下面是我的服務激活器代碼,它將調用和 ...

Spring 集成 TCP 低量或高量測定

[英]Spring Integration TCP Low Volume or High Volume Determination

我們的用例是使用Single TCP Connection (永不關閉)並執行請求-回復 model,而下一條消息等待直到收到當前請求的回復(塊模式)。 我們應該將60 條消息/分鍾視為Low-Volume 還是 High-Volume ,這將幫助我們確定是使用Gateway還是pair of Ad ...

Spring Integration TcpNetServerConnectionFactory for Single Never Close TCP 連接

[英]Spring Integration TcpNetServerConnectionFactory for Single Never Close TCP Connection

下面是否確保永不關閉單個TCP connection ,以及通過關閉並重新創建TCP connection從任何網絡錯誤中恢復? 我們的用例是遺留的,需要一個應該繼續讀寫的 TCP 連接。 請建議。 此外,找不到在IntegrationFlow DSL 中包含/配置heartbeat消息的方法。 ...

FileSystemPersistentAcceptOnceFileListFilter 不拾取文件

[英]FileSystemPersistentAcceptOnceFileListFilter Not Picking Up File

我正在使用 OpenJDK Java 17、Spring 與 Spring Boot 2.7.4 的集成。 使用以下代碼查看文件目錄,我可以看到元數據存儲表已使用文件及其時間戳進行更新。 但它從未到達 fileChannel 代碼進行處理。 也許是時間問題?? 這個應用程序在今天之前已經運行了幾個月 ...

從數據庫中匯集數據並再次查詢數據庫以獲取其他信息的最佳方法是什么?

[英]What is the best approach while pooling data from DB and query DB again to fetch additional information?

我正在處理的 spring 啟動應用程序從表 X 匯集 1000 條消息 [此表 X 由另一個服務 s1 填充] 從每條消息中獲取帳號並查詢表 Y 以獲取有關帳戶的其他信息。 我正在使用 spring 集成到表 X 中的消息池並讀取帳戶的附加信息,我計划使用 Spring JDBC。 我們預計每天 ...

使用 Spring 集成從子目錄中存在的遠程服務器遞歸讀取文件

[英]Recursively read files from remote server present in subdirectories with Spring Integration

我有使用入站采用者從遠程服務器中存在的單個文件夾獲取文件的工作流程,但我想獲取任何遠程服務器父文件夾中存在的所有子文件夾的文件我有這樣的代碼 但我想獲取 foo 目錄中存在的所有子文件夾的文件,而不是單個文件夾如果可能,請幫助提供完整代碼 ...

Apache FTPClient(和 Spring 中的 DefaultFtpSessionFactory)的不同超時屬性的含義是什么?

[英]What is the meaning of different timeout properties of Apache FTPClient (and DefaultFtpSessionFactory in Spring)?

有以下用於 FTP 通信的超時屬性: connectTimeout :以毫秒為單位的連接超時,它將傳遞給 Socket 對象的 connect() 方法 defaultTimeout :打開套接字時使用的默認超時(以毫秒為單位) dataTimeout :從數據連接讀取時使用的超時時間(以毫秒 ...

Spring Integration WebFlux outboundGateway ClientHttpResponse to Mono<object><div id="text_translate"><p> 我們如何將ClientHttpResponse的Flux<DataBuffer>轉換為Mono<SomeDto> 。 另外,我們可以訪問bodyExtractor中的MessageHeaders嗎? 請建議。</p><pre> .handle(WebFlux.outboundGateway(apiUrl, webClient).httpMethod(POST).mappedRequestHeaders(CONTENT_TYPE).bodyExtractor((clientHttpResponse, context) -> validateAPIResponse(clientHttpResponse))) private Mono<Object> validateAPIResponse(final ClientHttpResponse clientHttpResponse) { var httpStatus = clientHttpResponse.getStatusCode(); // check for 500 if (httpStatus.is5xxServerError()) throw new SomeException(.......); var responseMono = new Jackson2JsonDecoder().decodeToMono(clientHttpResponse.getBody(), ResolvableType.forClass(SomDto.class), null, null); // check for any other than 200 if (.httpStatus.is2xxSuccessful()) return responseMono.map(response -> { throw new SomeOtherException(response,getSomeField(); httpStatus); });</pre></div></object>

[英]Spring Integration WebFlux outboundGateway ClientHttpResponse to Mono<Object>

我們如何將ClientHttpResponse的Flux&lt;DataBuffer&gt;轉換為Mono&lt;SomeDto&gt; 。 另外,我們可以訪問bodyExtractor中的MessageHeaders嗎? 請建議。 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM