spring-integration

Spring Integration - Inbound file endpoint. How to process a file correctly.

我怕爱的太早我们不能终老 提交于 2019-12-23 18:30:04
问题 I have a Spring integration flow as following. <int-file:inbound-channel-adapter id="filesIn" directory="file:${incomingDir}" filename-pattern="*.txt" prevent-duplicates="true"> <int:poller id="poller" fixed-delay="5000"/> </int-file:inbound-channel-adapter> <int:splitter input-channel="filesIn" ref="filesSplitterService" method="splitFilesToReportContent" output-channel="reportProcessIn" /> <int:channel id="reportProcessIn"/> <int:chain input-channel="reportProcessIn" output-channel=

Integration issues with Spring Batch and Spring Integration - “No poller has been defined for endpoint” exception

拟墨画扇 提交于 2019-12-23 18:20:32
问题 I went through the Spring Integration guide and the examples here and got a working sample for Spring Integration SFTP program. I already have a working Spring Batch program that reads a bunch of file and dumps into the Database. I am now trying to integrate both Spring Batch and Spring Integration programs by going through the Spring docs and I created the below configuration. <bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">

Spring Integration: the SecurityContext propagation

一曲冷凌霜 提交于 2019-12-23 17:32:15
问题 I have some perplexity about the SecurityContext propagation in Spring Integration. Here is the point of the documentation: http://docs.spring.io/spring-integration/reference/htmlsingle/#security-context-propagation My perplexity are the following: (1) To be sure that our interaction with the application is secure, according to its security system rules, we should supply some security context with an authentication (principal) object. The Spring Security project provides a flexible, canonical

Spring Integration STS Plugin integration-graph “manual mode”

女生的网名这么多〃 提交于 2019-12-23 16:07:21
问题 In multiple forum threads, people are talking about a "manual mode" when editing spring-integration xml file in integration-graph tab. The problem is I'm unable to find a way to access this manual mode and to change the layout of the default provided graph (which is a complete mess). I tried to change the position of elements but I get a red cross and I can find a button that says switch to manual mode or something like that? Could someone help ? My Env : Eclipse 4.4.2 + Spring IDE plugin 3.6

Implementing retry logic in Ibm Websphere MQ with spring

限于喜欢 提交于 2019-12-23 15:36:27
问题 I am working on below configuration for messaging using Spring and Webphere MQ. I have a requirement of implementing retrying logic for a scenario, where I receive a message from the queue and put the message data on to a Elastic search server (search server is non transactional), if the search server is down I have to rollback the message on to the queue again and process the message after some interval of time(for example: 30 seconds) . this retry has to be done for 5 times. after 5 times

Spring Integration combine path variables and post body in payload expression

旧城冷巷雨未停 提交于 2019-12-23 13:05:34
问题 Using an http inbound-gateway I am able to specify a payload-expression using SPEL that will access header, requestParams, and pathVariables. How do I also include the body from a POST? An example of what I currently have is <int-http:inbound-gateway path="/document/{product}/{id}/blah" supported-methods="GET" request-channel="documentService.blah" reply-channel="httpReplyChannel" message-converters="jsonMessageConverter" header-mapper="defaultHttpHeaderMapper" payload-expression="new

Spring cloud stream and consume multiple kafka topics

僤鯓⒐⒋嵵緔 提交于 2019-12-23 12:38:16
问题 I have an issue with spring-boot-stream during some attempts for consume multiple topics in one @StreamListener . According to spring-cloud-stream docs: Accordidng to docs: destination The target destination of a channel on the bound middleware (e.g., the RabbitMQ exchange or Kafka topic). If the channel is bound as a consumer, it could be bound to multiple destinations and the destination names can be specified as comma separated String values . If not set, the channel name is used instead.

Junit Mockito test case for ResponseEntity<?> in spring integration framework

帅比萌擦擦* 提交于 2019-12-23 09:39:05
问题 I am trying to mock the external call. ResponseEntity<?> httpResponse = requestGateway.pushNotification(xtifyRequest); requestGateway is an interface. public interface RequestGateway { ResponseEntity<?> pushNotification(XtifyRequest xtifyRequest); } Below is the test method i am trying to do. @Test public void test() { ResponseEntity<?> r=new ResponseEntity<>(HttpStatus.ACCEPTED); when(requestGateway.pushNotification(any(XtifyRequest.class))).thenReturn(r); } A compilation error is there in

Spring DLMC and JMSTemplate behavior while using Transactions

懵懂的女人 提交于 2019-12-23 06:06:07
问题 I have a some questions regarding transactions in DMLC and JMSTemplate. Does Spring DMLC receive messages asynchronously using callbacks if we are not using transactions ? Does DMLC also receive messages asynchronous while using transacted session. (setting sessionTransacted to true). What is the behavior after setting sessionTransacted to true ? 3, What is the difference between AUTO_ACK and SESSION_TRANSACTED mode from consumer's prospective. In AUTO_ACK mode DMLC send acknowledgement to

Spring Cloud dataflow: Register new custom kryo serializer

北战南征 提交于 2019-12-23 05:44:07
问题 I am creating a system using cloud-dataflow, I have a source and a transformer. We like to use kryo, but some of our classes require custom kryo serializers, I have written serializers before. We are now using spring-integration-core-4.3.11, and since 4.2 the model has changes(per the docs) to use Codecs instead of MessageConverter interface. The question is, how can I register the kryo serializers in the new Codec framework, do I make a new Codec implementation inheriting from MessageCodec?