spring-integration

Permanent JMS Connection failure but no error

戏子无情 提交于 2019-12-11 22:52:24
问题 I have 3 servers - 2 servers running identical spring integration applications and 1 websphere MQ server. Both applications connect to the same topic. After what seems like an unpredictable amount of time (sometimes hours, sometimes days) both applications stop receiving messages. This failure occurs on both applications at approximately the same time. The applications require a restart in order to recover. Both applications have the following config: <bean id="jmsInputFactory" class="com.ibm

How to use SpEL to read payload and header content in a Spring Integration Router

情到浓时终转凉″ 提交于 2019-12-11 21:29:36
问题 Technologies in my project Spring Boot 2 Spring Integration (XML style) Java 8 Tomcat 9.x/Liberty 19.0.0.1 As a part of my Spring Integration project (REST API with an inbound-http-gateway, that takes an XML input and produces an XML output), I am writing the following components: A service-activator that performs basic validation of the incoming XML against its XSD. If validation is successful, a POJO (a builder-pattern Java object) is built with a Boolean instance variable/property called

How does ChunkMessageChannelItemWriter collect replies in spring batch remote chunking?

五迷三道 提交于 2019-12-11 21:17:33
问题 I am trying to implement remote chunking in spring batch using spring integration and amqp (rabbitmq). I am not able to understand how does ChunkMessageChannelItemWriter collect replies in remote chunking test below https://github.com/spring-projects/spring-batch/blob/master/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkStepIntegrationTests-context.xml How does it work ? Does it send one message, wait for its reply, receives its reply and

How can I read files from two different directory using @InboundChannelAdapter (Spring Integration with java configuration)

余生颓废 提交于 2019-12-11 21:11:36
问题 I'm trying to implement below scenario: I have a trigger file and a data file which is kept in different directories. Only if I receive a trigger file, I should be able to access the data file, then do the splitting and further processing logic. Also, the case is there will be a single trigger file but multiple data files. So after fetching the trigger file, I should be able to process all the data files. Below is the code for I used but it is fetching form only one directory private static

How to configure a mail channel in Spring Boot?

こ雲淡風輕ζ 提交于 2019-12-11 21:06:22
问题 I've found Mail Integration in the Spring Docs, a mail channel example with XML configuration, a suggestion to use Jasypt to encrypt the userid/password in the XML config, and an XML-based config in the Spring Boot Samples repo, but I have not figured out how to securely configure and use an email channel in a Spring Boot web app that is using annotations. I looked for ways to incorporate XML bean definitions, and how to convert XML to annotations, but came up empty. How should I configure

Need any working example of <int-mail:outbound-channel-adapter>

我怕爱的太早我们不能终老 提交于 2019-12-11 21:00:17
问题 Can anyone provide a working example (config) for ? I checked "Spring Integration Reference Manual" and github where all si samples have been provided but i could not find anything for . 回答1: Something like this: <int:chain input-channel="inputChannel"> <int-mail:header-enricher> <int-mail:to value="mailto"/> <int-mail:from value="mailfrom"/> <int-mail:subject value="With Content Type"/> <int-mail:content-type value="text/html"/> </int-mail:header-enricher> <int-mail:outbound-channel-adapter

file inbound-channel-adapter performance issue

白昼怎懂夜的黑 提交于 2019-12-11 20:22:00
问题 We have a spring integration application which will monitor on an incoming folder then process the files. When the application is down for maintenance or some other reason the incoming folder is filled with 100K files by upstream application. When restart application it is getting frozen it is not processing incoming files may be trying to load all the incoming files. Here is configuration <file:inbound-channel-adapter id="inFiles" channel="inFilesin" directory="file:${incoming.folder}" queue

JUnit for Spring Integration Activator with return type Message<?>

可紊 提交于 2019-12-11 19:50:03
问题 I am trying to write a JUnit test cases. and I became clue less how can i write test case for the below method. What all needs to be mocked. @Autowired private DoseService doseService; public Message<List<Dose>> getAllDoses() { log.info("GET method"); List<Dose> doseLst = doseService.getAllDoses(); return MessageBuilder.withPayload(doseLst).setHeader("http_statusCode", HttpStatus.OK).build(); } Thanks in advance for the help. 回答1: Looking to your method I would say that only DoseService has

Aggregator that releases partial group based on correlation but holds on to rest of the messages

谁说我不能喝 提交于 2019-12-11 19:49:00
问题 I want to set the correlation strategy on an aggregator so that it uses a date out of the incoming file (as message) name to correlate files so all files with todays date belong to the same group. Now since I might have multiple days worth of data its possible that I have aggregated 2 days of files. I want to base the release strategy on a done file (message) that includes the date in the filename as well so essentially each day will have a bunch of files and a done for file. Ingesting done

Execution process gets halted after certain period with executor still active and its queue count fixed

蹲街弑〆低调 提交于 2019-12-11 19:46:15
问题 I've configured tcp call in spring integration with following flow: Gateway(Future call)====>Splitter(with executor)====>router(to 2 different transformers)===>Outboud-gateway===>Aggregator====>service Aggregator is configured on receiving the reply because need to make another tcp call based on particular value received from first call, then send to service class. I am getting problem after certain period of execution (records properly getting persisted) when everything halts, executor