spring-integration

How to add logging to a jdbc pollar adapter

巧了我就是萌 提交于 2019-12-11 12:47:12
问题 I am trying to implement BeanPostProcessor to return my own JdbcPollingChannelAdapter that will help me to add some logging and know about polling activity. I have some code below, please help to complete this or if there is a better way. Thanks public class CustomAdapter extends JdbcPollingChannelAdapter { private final static Logger logger = LoggerFactory.getLogger(CustomAdapter .class); public CustomJdbcPollingChannelAdapter(DataSource dataSource, String selectQuery) { super(dataSource,

How to control character encoding in Spring integration TCP gateway

夙愿已清 提交于 2019-12-11 12:36:35
问题 I have set up a Spring integration gateway using the documentation and examples that are available online. I'm sending an XML message that is ISO-8859-1 encoded, but the receiving part is telling me that the message comes to them in an encoding different from ISO-8859-1. My config looks like this: <!-- Spring integration begins --> <beans:bean id="javaDeserializer" class="org.springframework.integration.ip.tcp.serializer.ByteArrayRawSerializer" /> <int:gateway id="gw" service-interface="com

Spring integration Kafka XML argument error

僤鯓⒐⒋嵵緔 提交于 2019-12-11 12:31:11
问题 The kafka and zookeeper works fine because I've tried the basic method for JAVA to produce or consume a message, so the problem here is that, I'm considering using Spring integration Kafka with my project and the XML file is like this: <int:channel id="inputToKafka"> <int:queue/> </int:channel> <int-kafka:outbound-channel-adapter id="kafkaOutboundChannelAdapter" kafka-producer-context-ref="kafkaProducerContext" auto-startup="false" channel="inputToKafka" order="3" > <int:poller fixed-delay=

How to open/close Spring Integration channel based on environmental variable?

大城市里の小女人 提交于 2019-12-11 12:11:13
问题 I have a channel that is used as input-channel in a chain. I need to use it only when the environmental variable sd is not true. Is it possible to write this condition into the spring-integration file without creating an additional Java filter? So, I would like this chain not to work when -Dsd=true in the startup script and work in any other case. <int:channel id="sdCreationChannel"> <int:queue/> </int:channel> <int:chain input-channel="sdCreationChannel" output-channel="debugLogger"> <int

how to pass values through http headers dynamically using spring integration

你说的曾经没有我的故事 提交于 2019-12-11 12:03:43
问题 I am working on an rest application, and my rest application is always called by passing some parameters through http headers.And I have a filter in my rest application which gets invoked for every request and retrieves the parameters from http headers as shown below. @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest=(HttpServletRequest) request; String email =

552 sorry, your envelope sender domain must exist (#5.7.1)

随声附和 提交于 2019-12-11 11:58:54
问题 I'm not able to send a mail using ovh smtp server and spring integration. Configuration looks good to me, what am I missing? <int-mail:outbound-channel-adapter id="myOutboundMailChannelAdapter" channel="outboundMailChannel" mail-sender="mailSender" /> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="ns0.ovh.net"/> <property name="port" value="587"/> <property name="username" value="myUsername"/> <property name="password" value=

Spring integration connecting inbound HTTP gateway with outbound Websocket gateaway

眉间皱痕 提交于 2019-12-11 11:56:48
问题 I want to create a REST service to turn on the light. The architecture that I want to have is the following: Many embedded system each is connected to one light instance Each embedded system has a websocket client, that connects to my server My server holds a REST service that allows webclients to choose one light instance, and turn it on The REST service would have a parameter to specify a reference for one light instance, connected to the system and send the message to websocket client,

spring integration jdbc adapter for multiple nodes

会有一股神秘感。 提交于 2019-12-11 11:19:24
问题 I'm using the jdbc inbound-channel-adapter with a typical configuration as below to retrieve records from MYSQL DB. The question is how to make the jdbc inbound-channel-adapter work in a multiple nodes environment? Different nodes will have chance to get one same record to process. I know this may be a old questions but I cannot find the resolution so far. <int-jdbc:inbound-channel-adapter query="select * from messages where state='NEW'" channel="jdbcChannel" data-source="datasource" update=

Spring Integration - SFTP - JSCH - Session disconnects

笑着哭i 提交于 2019-12-11 11:11:43
问题 I'm trying to poll remote directories for file presence and sending a MQ message notifying some other component to move the file. We have this situation, threads/pollers login via password and connect to the server and immediately after a few seconds or so disconnect from the server and through the exception "Problem synchronizing remote directories..." and the threads recover from it and repeatedly go through the same issue. Here's the life cycle of of a particular thread 00000027, it

Can we run multiple job instances of same job with different parameters at the same time using Spring batch partitioning and rabbitmq

有些话、适合烂在心里 提交于 2019-12-11 11:05:57
问题 I have implemented my batch jobs using spring batch partitioning and using rabbitmq as a middle ware. I studied documentation and referred to these unit tests https://github.com/sshcherbakov/spring-batch-talk/blob/master/src/main/resources/META-INF/master.xml https://github.com/sshcherbakov/spring-batch-talk/blob/master/src/main/resources/META-INF/slave.xml I can run my job steps concurrently but I am bit worried about how it will work if I launch multiple instances of same job at the same