spring-integration-kafka | Spring Integration for Apache Kafka | Pub Sub library

 by   spring-projects Java Version: v3.3.1.RELEASE License: No License

kandi X-RAY | spring-integration-kafka Summary

kandi X-RAY | spring-integration-kafka Summary

spring-integration-kafka is a Java library typically used in Messaging, Pub Sub, Kafka applications. spring-integration-kafka has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.

The Spring Integration for Apache Kafka extension project provides inbound and outbound channel adapters and gateways for Apache Kafka. Apache Kafka is a distributed publish-subscribe messaging system that is designed for high throughput (terabytes of data) and low latency (milliseconds). For more information on Kafka and its design goals, see the Kafka main page. Starting from version 2.0 version this project is a complete rewrite based on the new spring-kafka project which uses the pure java "new" Producer and Consumer clients provided by Kafka.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              spring-integration-kafka has a low active ecosystem.
              It has 312 star(s) with 175 fork(s). There are 40 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 113 have been closed. On average issues are closed in 120 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of spring-integration-kafka is v3.3.1.RELEASE

            kandi-Quality Quality

              spring-integration-kafka has 0 bugs and 0 code smells.

            kandi-Security Security

              spring-integration-kafka has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              spring-integration-kafka code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              spring-integration-kafka does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              spring-integration-kafka releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 8155 lines of code, 470 functions and 66 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed spring-integration-kafka and discovered the below as its top functions. This is intended to give you an instant insight into spring-integration-kafka implemented functionality, and help decide if they suit your requirements.
            • Handles a request message
            • Returns the reply topic header
            • Create a producer record for the given message
            • Process a send result
            • Implementation of the receive method
            • Returns the next record
            • Creates the consumer
            • Post process bean definition
            • Determines the send timeout
            • Sets attributes if necessary
            • Initialize the listener
            • Initializes the instance
            • Builds an error message from the given Throwable
            • Parses message source
            • Sends a message
            • Fix the existing consumer factory
            • Parse bean definition
            • Initializes the listener
            • Build bean definition
            • Set the message converter
            Get all kandi verified functions for this library.

            spring-integration-kafka Key Features

            No Key Features are available at this moment for spring-integration-kafka.

            spring-integration-kafka Examples and Code Snippets

            No Code Snippets are available at this moment for spring-integration-kafka.

            Community Discussions

            QUESTION

            Spring Cloud Streams application throwing nested exception is java.lang.ClassCastException for a domain model class
            Asked 2021-Jun-28 at 15:00

            Hi I am trying out the latest Spring cloud stream framework for Kafka. However, for String and Double its working fine but when I try to send a Java POJO class, it throws the below exception.

            I have tried various configuration for serialization and deserialization but nothing seems to be working. I am able to produce the message from the Supplier, as json but the consumers are not able to process it due to the error.

            Any suggestions for the issue would be appreciated. Thanks

            ...

            ANSWER

            Answered 2021-Jun-28 at 03:17

            Finally I found out the issue. Feel extremely stupid because the issue was that there was no default no-arg constructor in the Model class. After adding the no-arg constructor, all works as expected.

            Source https://stackoverflow.com/questions/68149288

            QUESTION

            Spring Cloud Stream - how to handle downstream blocks?
            Asked 2021-Apr-20 at 13:10

            During a planned downtime for our Kafka cluster, we basically encountered the following issue How to specify timeout for sending message to RabbitMQ using Spring Cloud Stream? (with Kafka rather than RabbitMQ, obviously).

            The answer from @GaryRussell:

            The channel sendTimeout only applies if the channel itself can block, e.g. a QueueChannel with a bounded queue that is currently full; the caller will block until either space becomes available in the queue, or the timeout occurs.

            In this case, the block is downstream of the channel so the sendTimeout is irrelevant (in any case, it's a DirectChannel which can't block anyway, the subscribed handler is called directly on the calling thread).

            The actual blocking you are seeing is most likely in the socket.write() in the rabbitmq client, which does not have a timeout and is not interruptible; there is nothing that can be done by the calling thread to "time out" the write.

            The only possible solution I am aware of is to force close the rabbit connection by calling resetConnection() on the connection factory.

            explains quite well why the method in question (org.springframework.integration.channel.AbstractSubscribableChannel#doSend) does not take the timeout into account. However, this still seems a bit odd to me.

            In spring-integration-kafka-3.2.1.RELEASE-sources.jar!/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandler.java:566, we can see that, if sync behaviour is desired:

            ...

            ANSWER

            Answered 2021-Apr-20 at 13:10

            It doesn't appear to be documented, but similar to the listener container customizer https://docs.spring.io/spring-cloud-stream/docs/3.1.2/reference/html/spring-cloud-stream.html#_advanced_consumer_configuration you can add a ProducerMessageHandlerCustomizer @Bean to set arbitrary properties on the message handler.

            In newer versions of the handler, the timeout is always configured to be at least as much as ProducerConfig.DELIVERY_TIMEOUT_MS_CONFIG, to avoid false negatives (where the publication is successful after the handler times it out).

            Source https://stackoverflow.com/questions/67174655

            QUESTION

            Spring Integration Message Driven Channel Adapter not working with Spring-Kafka 2.3+
            Asked 2021-Mar-25 at 15:02

            I am getting the following issues when trying to get Message Driven Channel Adaptor working with Spring-Kafka 2.3+. Does anyone have any example code which would help me?

            1. org.springframework.kafka.listener.config.ContainerProperties does not actually exist.

            2. org.springframework.kafka.listener.ContainerProperties does exist but produces the below issue when trying to run.

            Description:

            An attempt was made to call a method that does not exist. The attempt was made from the following location:

            ...

            ANSWER

            Answered 2021-Mar-25 at 15:02

            5.4.5

            This includes version Spring-Kafka 2.3.6

            No it does not; the 5.4.x versions of spring-integration-kafka require 2.6.x; that method was added to the properties in 2.5.

            See the project page for compatible versions.

            https://spring.io/projects/spring-kafka

            If you are using Spring Boot, it will bring in all of the right versions, and you should not specify versions at all in your pom.

            For problem 3, it looks like you have a producer factory declared somewhere that is not compatible with the kafka template bean.

            Source https://stackoverflow.com/questions/66801324

            QUESTION

            spring-integration-kafka message-driven-channel-adapter XML config
            Asked 2020-Dec-08 at 17:11

            I am trying to write an app to consume messages from Kafka topic and then enrich the inbound message to add new headers. The versions in use are:

            ...

            ANSWER

            Answered 2020-Dec-08 at 17:11

            Are you having a runtime problem or an IDE problem?

            There's a test case that has a channel property.

            https://github.com/spring-projects/spring-integration/blob/15c2d16866a72470b35c65a34e869998f5823f81/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParserTests-context.xml#L12-L23

            I am seeing some false errors in eclipse right now; investigating...

            EDIT

            If you are using Spring Tool Suite 4, XML namespace support is disabled by default.

            Enabling it solved the problem for me, but I had to restart the IDE.

            Source https://stackoverflow.com/questions/65202943

            QUESTION

            Spring 5.X web Kafka Integeration using xml configuration (Not Spring boot)
            Asked 2020-Nov-10 at 12:00

            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

            ...

            ANSWER

            Answered 2020-Nov-07 at 21:01

            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

            Source https://stackoverflow.com/questions/64729819

            QUESTION

            How to enable Stateful Retry using spring-cloud-stream-binder-kafka and RetryTemplate?
            Asked 2020-May-18 at 15:08

            I am wondering if there is a way to enable Stateful RetryTemplate using spring-cloud-stream-binder-kafka.

            I noticed that there is a constructor

            ...

            ANSWER

            Answered 2020-May-18 at 15:08

            Stateful retry is no longer needed now that the SeekToCurrentErrorHandler has retry and backoff capabilities.

            Yes, to disable retry in the binder, set maxAttempts=1 and configure the STCEH appropriately.

            Source https://stackoverflow.com/questions/61865424

            QUESTION

            ClassNotFoundException: org.springframework.kafka.listener.config.ContainerProperties when trying to upgrade spring boot version
            Asked 2020-Apr-28 at 14:22

            I am developing a sample Spring integration project which has kafka listener using spring integration. This is working fine with lower version of boot (boot - 1.5.9, kafka-client 1.0.0, spring-integration-kafka 2.3.0, spring-kafka 1.3.2). But getting below error while upgrading boot version from 1.5.9 to 2.1.x :-

            ...

            ANSWER

            Answered 2020-Apr-28 at 12:46

            Use 3.1.5 with Boot 2.1.x - the latest 3.1.x, and 3.2.1 with Boot 2.2.x - see the compatibility matrix here.

            Spring Integration Kafka is still an extension and its version is not managed by boot because it has a faster release cadence.

            It will be pulled into the main project "soon".

            Source https://stackoverflow.com/questions/61479723

            QUESTION

            Spring integration : Failed to send message to channel 'executionFilterChannel' within timeout: -1
            Asked 2020-Apr-27 at 14:19

            Getting below error when i tried to use channel message store :- org.springframework.messaging.MessageDeliveryException: Failed to send message to channel 'executionFilterChannel' within timeout: -1

            ...

            ANSWER

            Answered 2020-Apr-27 at 14:19

            Your code in the interceptor is like this:

            Source https://stackoverflow.com/questions/61443991

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install spring-integration-kafka

            See the Spring Integration kafka Sample for a simple Spring Boot application that sends and receives messages.

            Support

            Documentation for this extension is contained in a chapter of the Spring for Apache Kafka Reference Manual.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/spring-projects/spring-integration-kafka.git

          • CLI

            gh repo clone spring-projects/spring-integration-kafka

          • sshUrl

            git@github.com:spring-projects/spring-integration-kafka.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Pub Sub Libraries

            EventBus

            by greenrobot

            kafka

            by apache

            celery

            by celery

            rocketmq

            by apache

            pulsar

            by apache

            Try Top Libraries by spring-projects

            spring-boot

            by spring-projectsJava

            spring-framework

            by spring-projectsJava

            spring-security

            by spring-projectsJava

            spring-petclinic

            by spring-projectsCSS

            spring-mvc-showcase

            by spring-projectsJava