Giter Club home page Giter Club logo

rabbitmq-consumer-receiver's Introduction

rabbitmq-consumer-receiver's People

Contributors

gustavoorsi avatar

Stargazers

Beyza avatar Choubani Amir avatar Maxwell Duarte avatar Mehmet Arif Emre Şen avatar Griffin Fujioka avatar gurpal2000 avatar Asapin avatar  avatar  avatar Robin Zhang avatar emeraldjava avatar  avatar 刘亚涛 avatar  avatar  avatar liutf avatar 陈金颖 avatar KUSO avatar  avatar  avatar  avatar Chakra avatar Jack avatar Giang Thiet avatar

Watchers

Chakra avatar coderofcoder avatar  avatar  avatar

rabbitmq-consumer-receiver's Issues

Steps to Execute this Project

First of all , sorry for posting this in an issue.
I downloaded the project. Need to execute this project.
Can i get the steps to execute this project ?

how to specify the hostname, user/password for cloudAMQP

Hi,
how do i specify the cloudAMQP credential info ?

when i run the producer springboot app, i get the following error.

Exception in thread "main" java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.runCommandLineRunners(SpringApplication.java:675)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:690)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at demo.producer.ProducerApplication.main(ProducerApplication.java:20)
Caused by: org.springframework.messaging.MessagingException: java.io.IOException; nested exception is org.springframework.amqp.AmqpIOException: java.io.IOException
at org.springframework.amqp.rabbit.core.RabbitMessagingTemplate.convertAmqpException(RabbitMessagingTemplate.java:263)
at org.springframework.amqp.rabbit.core.RabbitMessagingTemplate.doSend(RabbitMessagingTemplate.java:193)
at org.springframework.amqp.rabbit.core.RabbitMessagingTemplate.send(RabbitMessagingTemplate.java:110)
at org.springframework.amqp.rabbit.core.RabbitMessagingTemplate.convertAndSend(RabbitMessagingTemplate.java:137)
at org.springframework.amqp.rabbit.core.RabbitMessagingTemplate.convertAndSend(RabbitMessagingTemplate.java:122)
at org.springframework.amqp.rabbit.core.RabbitMessagingTemplate.convertAndSend(RabbitMessagingTemplate.java:115)
at demo.producer.Sender.sendToRabbitmq(ProducerApplication.java:75)
at demo.producer.ProducerApplication.run(ProducerApplication.java:59)
at org.springframework.boot.SpringApplication.runCommandLineRunners(SpringApplication.java:672)
... 5 more
Caused by: org.springframework.amqp.AmqpIOException: java.io.IOException
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:63)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:217)
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:444)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:80)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:130)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:67)
at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1035)
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1028)
at org.springframework.amqp.rabbit.core.RabbitTemplate.send(RabbitTemplate.java:540)
at org.springframework.amqp.rabbit.core.RabbitTemplate.send(RabbitTemplate.java:534)
at org.springframework.amqp.rabbit.core.RabbitMessagingTemplate.doSend(RabbitMessagingTemplate.java:190)
... 12 more
Caused by: java.io.IOException
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:106)
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:102)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:348)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:603)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:204)
... 21 more
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:348)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:294)
... 23 more
Caused by: java.net.SocketTimeoutException: Timeout during Connection negotiation
at com.rabbitmq.client.impl.AMQConnection.handleSocketTimeout(AMQConnection.java:585)
at com.rabbitmq.client.impl.AMQConnection.access$600(AMQConnection.java:65)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:560)
at java.lang.Thread.run(Thread.java:748)

How to catch and handle MessageConversionException?

Hi,

Thank you for sharing.
The consumer can run properly with json format input. However, if I publish a non-json message, it will have problem, the exception stack goes like following.

org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException
org.springframework.amqp.support.converter.MessageConversionException
org.springframework.messaging.converter.MessageConversionException
com.fasterxml.jackson.core.JsonParseException

It's fine for me to see exceptions. I want to catch them and handle by myself. Do you have any idea how to do it? The conversion errors happen inside the jackson2Converter, which is out of control of user code. So I don't know how can I catch these exceptions.

Thanks and Regards,
Ruijie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.