Spring-integration jms - spring-integration

I am new in spring-integration , I am having problem creating a project with jms , can any one send me the sample project on this and also steps to configure and also run procedure .And also which jms provider I need to install.
Thanks.

See the JMS sample under 'basic' here https://github.com/SpringSource/spring-integration-samples.
The sample uses ActiveMQ so no installation is needed, maven will download it for you.
I also suggest you take a look at the reference http://static.springsource.org/spring-integration/docs/2.1.3.RELEASE/reference/html/

Related

Spring 5.X web Kafka Integeration using xml configuration (Not Spring boot)

I am trying to setup a kafka consumer on legacy web application using xml configuration that is running Spring 5.2 release project (It is not a spring boot project).
After looking up I found a project that sets up the kafka consumer using xml configuration like in here
https://docs.spring.io/spring-kafka/docs/1.3.11.RELEASE/reference/html/_spring_integration.html
However this does not give details on how to connect this with java in a spring web application . All examples are for spring-boot project. I did find out what configuring I need to add to xml
https://github.com/spring-projects/spring-integration-kafka
I also did find an example of Spring web application and kafka but it is for 4.X release and is from 2015.
https://techannotation.wordpress.com/2015/10/26/introduction-to-apache-kafka-using-spring/
Any help on any newer documentation or on how to setup a consumer in java spring web project with xml configuration in 2020 would be appreciated
It is not clear why you mention Spring Integration framework all the time, but you don't accent on it.
Let's see if this doc helps you though: https://docs.spring.io/spring-integration/docs/current/reference/html/kafka.html#kafka !
Pay attention the Spring Integration is 5.4 already.
This sample is Spring Boot based, but still should give you a general idea how to configure Kafka channel adapter with Java: https://github.com/spring-projects/spring-integration-samples/tree/master/basic/kafka
With Help from Gary Russel and Artem Bilan I was able to figure this out. Since I am using legacy spring application I needed this project and not spring integration project
https://spring.io/projects/spring-kafka
I also followed documentation here to setup java config for kafka listener
https://docs.spring.io/spring-kafka/docs/2.3.12.RELEASE/reference/html/#with-java-configuration
I used this to figure out how to have both java config and xml config work together
https://memorynotfound.com/mixing-xml-java-config-spring/
Here is gist of my implementation that worked
https://gist.github.com/praveen2710/7dcf1671379ee6db4581436e1225c673

how to use subflow in spring integraion

I am working on project where we have used spring integration. And we have may flow which eventually create a full flow of the system.
Now, we needs to create a main flow which have all abstract component which internally call the sub flow. I found spring integration flow project for create a subflow. https://github.com/spring-projects/spring-integration-flow/tree/master.
But while I try to find out latest jar I found which is build on 2015 (https://mvnrepository.com/artifact/org.springframework.integration/spring-integration-flow). Now I am confused that do we have to use this project or some other approach spring integration build which needs to use.
e.x:
we have 3 flow file.
1) prepare-file.xml
2) prepare-database.xml
3) enrich-object.xml
which eventually call like prepare-file.xml-->prepare-database.xml-->enrich-object.xml
Now, we like to create a file which is master-flow.xml which shows all component in diagram very high level.
Thanks,
Nishit C.
Well, that project hasn't have enough interest in community for a while. And now when most people step aside from XML configuration in favor of Java & Annotation configuration with Spring Boot on top, such a project doesn't have its attractiveness any more.
On the other hand we provide a Java DSL for Spring Integration flows several years already: https://docs.spring.io/spring-integration/docs/current/reference/html/#java-dsl
I would say its IntegrationFlow definitions with the sub-flow functionality may server for your requirements.
I understand that this might not be an answer you are looking for, but at least this one should be as some food to think about.

Server created using hazelcast-3.6.jar is not picking up configs from hazelcast.xml

I am using spring boot to test my Rest API's with hazelcast-3.6 as the DB.I am using hazelcast-3.6.jar to setup a server.The server created this way is not picking up properties from hazelcast.xml provided.Can someone guide me how to make it pick up the properties from hazelcast.xml?
Run you program with -Dhazelcast.config=<path to hazelcast.xml> or put your hazelcast.xml in the classpath.
Make sure to put the hazelcast.xml to the right directory.
Please check the Checking configuration manual section where it's explained what's the order of config file check:
http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#checking-configuration
Please find the examples of using Hazelcast with Spring Boot here.
Here you can find how to configure Hazelcast with Spring.

Designing ServiceStack with RedisMQ

I am implementing a solution that has a web interface (service stack) and a long running job service (servicestack?).
I already implemented the web interface and found servicestack a really good framework for creating what i wanted. I used redis as a semi reliable object store.
Then i started to think about how to implement the job service.
What i originally thought i do was to set up a simple windows service and have the redis client pick up thinks marked for the job service ( how exactly i wasn't sure ). These are very long running jobs that require alot of resources so i want to throttle how many of them are running at a time and also if i could fan out with worker machines that would be nice.
Then i saw that ServiceStack has a RedisMQ that might fit the bill, and hence the question.
Should i create a seperate servicestack service and host it in a windows service. Then have a MQ interface on it and let the webservice post to that message queue jobs that need to run. Then the jobservice is decoulpled from the webservice and all is well.
or
Am i over thinking it and should just use the logic part of the service i already have running and implement the job logic there, could pop in a MQ but in the same process that would probably just be a waste of time. I could skip the message part entirely and just call the logic part straight with some throttling algorithm.
Also when i was testing this out i had trouble with creating the RedisMQ server
using ServiceStack.redis;
using ServiceStack.messaging;
var mqHost = new RedisMqServer(redisFactory, retryCount:2);
Returns RedisMQServer not found.
I did a full nuget install of the servicestack and servicestack.redis packages
install-package servicestack
install-package servicestack.redis
When i use object browser on the .dll i don't find any mention of the ReidsMQServer, the version i 4.0.15
I found this url https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Server/Messaging/Redis/RedisMqServer.cs
And would think that this should belong to the servicestack.redis reference.
Any help appreciated,
cheers
Redis MQ is in the ServiceStack.Server NuGet package, i.e:
PM> Install-Package ServiceStack.Server
When in doubt as to which package to install, refer to ServiceStack's download page, e.g: https://servicestack.net/download#mq

Send email with Amazon SES in Spring Integration

I am looking for the best way of sending emails with Spring Integration using Amazon SES.
After some researching, I have found that an amazon Spring extension was being created for this purposes:
https://github.com/SpringSource/spring-integration-extensions/tree/master/spring-integration-aws/src/test/resources
But in SES's examples, I have seen that the namespace http://www.springframework.org/schema/integration/aws is not available...
Is the project still alive or there is a better option?
Spring finds dependent XSD schemas on the classpath - spring apps/extensions do not have to publish their schema on the internet; the namespace URI is a key used to locate the schema which, in this case is here.
The namespace mapping is here.
Work continues on this extension project and I am sure the author (Amol) will welcome your feedback.
Using the extension does assume some prior knowledge of the Spring Integration Project.

Resources