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

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

Related

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.

How to monitor Wildfly with Nagios?

I've read that it's possible to monitor Wildfly with Nagios in links like this one and I also know that there are solutions that provide that service as well.
Does anybody knows how to do that, how to monitor Wildfly with Nagios, any recommendations on how to start? Any reference would be very appreciated.
You can consider using JSON based HTTP management API. Sample plugin (Python based) for JBossAS - standalone mode is available here https://github.com/aparnachaudhary/nagios-plugin-jbossas7. This should also work for WildFly.
Some details about WildFly HTTP Management API can be found here https://docs.jboss.org/author/display/WFLY9/The+HTTP+management+API

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.

Spring-integration jms

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/

Integration of Java application with OpenCms

I want to know how to integrate a Java web application with OpenCms contents. Is it possible to integrate a Java application with OpenCms?
Yes, it's possible. For example you can integrate SpringMVC or Struts into OpenCms, or other tools like JForum, an open source java forum, which also supports single-sign-on (SSO).
You can find information here & a small sample OpenCms+Spring integration project:
http://www.opencms-wiki.org/wiki/Integration_HOWTOs
Since OpenCms is open source and based on Java EE standards, you are pretty free.
What I have done successfully is to create a jstl tag library to connect JSPs in OpenCms to a business backend.
In my case it was done through a SOAP web-service.
Another advantage of this was that I could test and develop my code in Eclipse, without a dependency on OpenCms.
Deploying to production would then mean to deploy a jar file to the OpenCms webapp.
Yet another advantage: Since we put some of the view-logic into the OpenCms-hosted JSPs, they were versioned by OpenCms.
We have integrated SprigMVC into an existing OpenCMS installation. Here is a description of how we went about that: http://blog.shinetech.com/2013/04/09/integrating-springmvc-with-opencms/

Resources