spring-integration

Spring MQTT: java.util.MissingResourceException: Can't find bundle for base name org.eclipse.paho.client.mqttv3.internal.nls.logcat, locale en_US

强颜欢笑 提交于 2019-12-10 23:32:26
问题 NOTE WELL: I am NOT running eclipse. I am running a standalone Spring application from the command line with maven. When I attempt to send a message to an outbound channel adapter created with IoC using spring-integration-mqtt 4.3.8, I get java.lang.ExceptionInInitializerError at org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory.getAsyncClientInstance(DefaultMqttPahoClientFactory.java:147) at org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler

Spring integration DSL: configure handler that handles only when the argument matches

牧云@^-^@ 提交于 2019-12-10 23:26:15
问题 I am using Spring Integration DSL configs. Is it possible to add a method reference handler such that the handler is invoked only when the message payload matches the handler argument type? For example: in the following code, if the payload is MyObject2 , Spring will throw ClassCastException at handleMessage . Instead, what I want to do is to bypass handleMessage and get picked up by handleMessage2 . @Bean public IntegrationFlow myFlow() { return IntegrationFlows .from("myChannel") .handle

Spring-Integration UnableToRegisterMBeanException: InstanceAlreadyExistsException

我们两清 提交于 2019-12-10 22:26:51
问题 I am getting InstanceAlreadyExistsException while trying to deploy in tomcat 8 in linux server the code with Spring Integration having 2 separate flows. I referred several forums and still not able to find a solution for this. But am not getting this exception while testing in my local tomcat 8 in windows platform. Any input is appreciated. Stacktrace - 2016-08-30 14:27:40 ERROR SpringApplication:838 - Application startup failed org.springframework.jmx.export.UnableToRegisterMBeanException:

How do I setup TCPConnectionFactory or SSLServerSocketFactory from Java in Spring Boot

百般思念 提交于 2019-12-10 21:06:33
问题 I am new to Spring Boot but have been requested by my job to implement a small web service using spring boot. The web service needs to accept SSL TCP connections (an external system will connect to my web service using a custom protocol - NOT HTTP). Also, I would like to handle these connections in a background task (or multiple background tasks). After looking at the official documentation (http://docs.spring.io/spring-integration/reference/html/ip.html), I still don't understand (where do I

Headerenricher Spring Integration and java dsl

不问归期 提交于 2019-12-10 20:52:00
问题 I'me using Spring Integration and java dsl specifications to implement my IntegrationFlow. I want to use an custom header enricher to add some file names to the header, it will be something like : public class FileHeaderNamingEnricher { public Message<File> enrichHeader(Message<File> fileMessage) { // getting some details fom the database ... return messageBuilder .setHeader("filename", "somestuff") .build(); } } And my Integration flow will look like : public IntegrationFlow myflow() {

How to process more than 10 concurrent messages from an AWS SQS FiFo queue using Spring Integration

拥有回忆 提交于 2019-12-10 19:16:49
问题 I want to be able to process more than 10 SQS messages at a time using a Spring Integration Workflow. From this question, the recommendation was to use an ExecutorChannel . I updated my code but still have the same symptoms. How execute Spring integration flow in multiple threads to consume more Amazon SQS queue messages in parallel? After making this update, my application requests 10 messages, processes those, and only after I make the call to amazonSQSClient.deleteMessage near the end of

spring arbitrary messaging tcp socket

穿精又带淫゛_ 提交于 2019-12-10 18:39:15
问题 i am using spring-integration to develop a customized two-way tcp socket server. the server will process request / response tasks but i am not able to send an arbitrary message to specific connection-Id also i know maybe using TcpSendingMessageHandler and TcpReceivingChannelAdapter is the solution , but i was not able to find any sample code about how to use that. here is my code : public class SocketServer { private Logger logger = LoggerFactory.getLogger(SocketServer.class); @Bean public

Spring Integration 5.0 + Project Reactor: controlling threads

蹲街弑〆低调 提交于 2019-12-10 18:08:21
问题 Followup question for https://stackoverflow.com/a/47136941/1776585 I can't make my integration handler to run in parallel threads while using Flux + split() + FluxMessageChannel . Consider the following snippet: // ... .handle(message -> Flux.range(0, 10) .doOnNext(i -> LOG.info("> " + i)) .subscribeOn(Schedulers.parallel())) .split() .channel(new FluxMessageChannel()) .handle(message -> LOG.info(" -> " + message.getPayload()))) // ... All logs are output in one thread: [ parallel-1] d.a

TaskExecutor is not working Spring Integration

心已入冬 提交于 2019-12-10 18:01:31
问题 I have setup File poller with task executor ExecutorService executorService = Executors.newFixedThreadPool(10); LOG.info("Setting up the poller for directory {} ", finalDirectory); StandardIntegrationFlow standardIntegrationFlow = IntegrationFlows.from(new CustomFileReadingSource(finalDirectory), c -> c.poller(Pollers.fixedDelay(5, TimeUnit.SECONDS, 5) .taskExecutor(executorService) .maxMessagesPerPoll(10) .advice(new LoggerSourceAdvisor(finalDirectory)) )) //move file to processing first

AMQP Spring Integration error handling

╄→尐↘猪︶ㄣ 提交于 2019-12-10 17:53:40
问题 I've got an integration flow that looks like the following: @Bean public IntegrationFlow auditFlow(@Qualifier("eventLoggingConnectionFactory") ConnectionFactory connectionFactory, @Qualifier("writeChannel") MessageChannel messageChannel, @Qualifier("parseErrorChannel") MessageChannel errorChannel) { return IntegrationFlows .from(Amqp.inboundAdapter(connectionFactory, auditQueue) .errorChannel(errorChannel) .concurrentConsumers(numConsumers) .messageConverter(new MongoMessageConverter())) //