spring-xd

SpringXD: ClassCastException of same class between modules in a stream

五迷三道 提交于 2019-12-25 07:52:02
问题 I have a custom Spring XD source module that uses Spring Social for Twitter and outputs Tweet objects. This is working just fine. I can log the output of the source and see the Tweet objects listed. I can change the output type of the source for that stream to application/json to see the output at JSON. This works as expected. I then created a processor module that will create a new object from that Tweet and output it. The transform message expects a GenericMessage containing a Tweet object

Spring XD: “tcp” source outputs byte array instead of string? How to output regular text?

大憨熊 提交于 2019-12-24 15:25:37
问题 The goal is to read data emitted over the network. On the data generation side I have an app which spews to stdout. The content of this data is a JSON string. Here's what I'm doing (on Linux Mint 17, using an BSD flavored netcat): data generation: my_app_which_outputs_json | netcat localhost 9999 In SpringXD: (with xd-singlenode ) xd:>stream create --name tcptest --definition "tcp --decoder=LF --port=9999 | file " --deploy Created and deployed new stream 'tcptest' Output: /tmp/xd/output$ cat

Passing http request header to RestAPI from SpringXD using http-client processor

左心房为你撑大大i 提交于 2019-12-24 14:30:35
问题 I am trying to hit a rest api from my http-client processor module. I would like to know how can I send request header to the url I am trying to hit. Without the request header I get 500 Internal Server Error. Will mappedRequestHeaders option be useful to pass headers, can someone give an example please. Below is how my stream looks like : jms --destination= | http-client --url='''https://hostname:11210/cards/accounts?eName=John%20Smith&caFSix=426600&caLF=1234''' --httpMethod=GET | log 回答1:

Error deploying more than one stream with a router 1.3.0

人走茶凉 提交于 2019-12-20 04:12:47
问题 I am encountering the following issue on the 1.3.0 release: xd:>stream create test1 --definition 'http | router --script="file:/tmp/file1.groovy"' --deploy this deployes fine. xd:>stream create test2 --definition 'http --port=9999 | router --script="file:/tmp/file2.groovy"' --deploy Here is the log trace for the second stream: 2015-11-20T16:57:45-0800 1.3.0.RELEASE ERROR DeploymentsPathChildrenCache-0 container.DeploymentListener - Exception deploying module org.springframework.jmx.export

Spring Integration Kafka adaptor not producing message

荒凉一梦 提交于 2019-12-13 13:31:14
问题 I am struggling this for days now. I am using SI adaptor for kafka under Spring-boot container. I have configured zookeeper and kafka on my machine. I also created console producer and consumer tested it and everything works fine(I manage to produce vis the console messages and have the console consumer to consume them). I tried now to produce messages via Spring integration kafka outbound adapter but the console consumer wont consume the message SI/Spring xd xml: <int:publish-subscribe

Spring Data Flow w/ 2 sources feeding one processor/sink

[亡魂溺海] 提交于 2019-12-13 07:34:51
问题 I'm looking for some advice on setting up a Spring Data Flow stream for a specific use case. My use case: I have 2 RDBMS and I need to compare the results of queries run against each. The queries should be run roughly simultaneously. Based on the result of the comparison, I should be able to send an email through a custom email sink app which I have created. I envision the stream diagram to look something like this (sorry for the paint): The problem is that SDF does not, to my knowledge,

filtering on multiple conditions spring xd

最后都变了- 提交于 2019-12-13 05:18:50
问题 I want to filter out payload if it contains following error codes 202048 202049 200003 filter --expression=payload.contains('202048')||payload.contains('202049')||payload.contains('200003') Can i put or condition in my expression || is my or 回答1: See the SpEL language reference. Use OR (or or ). You need spaces around the or so you need to quote the whole expression; since the module is likely within a string, you will need to escape the literal quotes. For example: xd:>stream create foo -

Spring XD Using custom TCP serializer

折月煮酒 提交于 2019-12-13 02:07:37
问题 I extended AbstractByteArraySerializer and now I want to use this serializer like the rest of the available TCP serializers (LF, NULL, L1, ...). I found the profiles in tcp-encdec.xml and registered my own profile: ... <beans profile="use-custom"> <bean id="CUSTOM" class="custom.tcp.serializer.ByteArrayCustomSerializer"> <property name="maxMessageSize" value="${bufferSize}" /> </bean> </beans> ... Spring uses EncoderDecoderMixins.Encoding to convert Encoding to a specific profile.

Spring XD - Mail source configuration - how to provide password

亡梦爱人 提交于 2019-12-13 00:26:38
问题 I created a mailstream with following command ------- stream create --name mailstream --definition "mail --host=imap.gmail.com --username=yyyyyyyy12@gmail.com --password=my password | file --dir=/tmp/gmailData" --deploy Refer -http://docs.spring.io/spring-xd/docs/1.0.0.BUILD-SNAPSHOT/reference/html/#modules But in the xd-singletone console I get - Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified? How to resolve this issue. Also --password=secret -

RabbitMQ - Channel shutdown: connection error (SpringXD closes rabbitmq connections repeatedly.)

纵饮孤独 提交于 2019-12-12 17:46:03
问题 I had a terrible night trying to figure out what is going on with RabbitMQ and SpringXD, unfortunately without a success. The problem: SpringXD closes RabbitMQ connections repeatedly, or reports warnings related to the channel cache size. Fragment from the SpringXD log (during stream initialization/autowiring): 2016-05-03T07:42:43+0200 1.3.0.RELEASE WARN DeploymentsPathChildrenCache-0 listener.SimpleMessageListenerContainer - CachingConnectionFactory's channelCacheSize can not be less than