Jun 12, 2018 - Springboot配置文件常用属性配置列表. SPRING WEB SERVICES (WebServicesProperties). DATA WEB (SpringDataWebProperties). Whether to enable publishing descriptions as part of the scrape payload to Prometheus. 学习(翻译) Spring任务执行和调度(TaskExecutor,TaskSchedule).
I am getting the following exception repeatedly when I start my spring boot application with rabbitmq. The entire flow is working fine even with the below exceptions. is it to do with the auto-delete in by means ?
the following are my beans
Update:
with debug enabled the messages are
Pradeep
PradeepPradeep39111 gold badge66 silver badges2323 bronze badges
3 Answers
izilottiizilotti3,66011 gold badge3838 silver badges4545 bronze badges
It has nothing to do with auto-delete queues (except the fact that you have some means the container is initializing the connection at this particular point in its lifecycle).
You seem to have some network issues...
The rabbitmq client library has a hard-coded 5 second timeout when waiting for the response for the connection start command and the server is not replying in time.
Gary RussellGary Russell89.6k88 gold badges5454 silver badges8080 bronze badges
I think it is about your spring-rabbit version.I encountered the same problem as you. but I have no idea to fix it.But in my another project, it works well. Then I compared two projects.I discovered the spring-rabbit version is different from each other.
this new version throw TimeoutException.but
this version it works well.my spring-boot version is 'Camden.SR2'.default spring-rabbit 1.6.5.RELEASE.
Hope it helps you
ChangelChangel
Not the answer you're looking for? Browse other questions tagged javaspringrabbitmqspring-rabbitspring-rabbitmq or ask your own question.
Initially I was using regular java Multithreading using the 'implements' method. However @Autowired does not work when a class is created with
new
in Spring, so I am trying to change it to using Spring'sAsync
method. This is what I have so far. How would I go about adding the threads to the ThreadPoolExecutor?The class that should create the threads
The Async class
AryaArya3,3731313 gold badges5252 silver badges103103 bronze badges
1 Answer
By default Spring uses a
SimpleAsyncTaskExecutor
to execute async methods. This will by default spawn a new thread for every operation.To define your own executor for use with async tasks, create a bean that implements the
TaskExecutor
interface or an Executor
bean named 'taskExecutor'
.If you'd like to have your own custom executor just for this component, you can
jspcaljspcalimplement AsyncConfigurer
and provide your own executor service:42.4k44 gold badges5555 silver badges6565 bronze badges