activemq

What is ActiveMQ used for?

依然范特西╮ 提交于 2019-12-02 14:13:19
I looked it up and you send messages to it. But why? Why wouldn't you just use a database? There must be some feature that ActiveMQ has that databases do not? Hiram Chirino It is used to reliably communicate between two distributed processes. Yes, you could store messages in a database to communicate between two processes, but, as soon as the message is received you'd have to delete the message. That means a row insert and delete for each message. When you try to scale that up communicating thousands of messages per second, databases tend to fall over. Message oriented middle-ware like

message-driven-channel-adapter drops first message after app context startup unless send is called with a delay

雨燕双飞 提交于 2019-12-02 14:03:29
问题 I have an integration test for my Spring Integration config, which consumes messages from a JMS topic with durable subscription. For testing, I am using ActiveMQ instead of Tibco EMS. The issue I have is that I have to delay sending the first message to the endpoint using a sleep call at the beginning of our test method. Otherwise the message is dropped. If I remove the setting for durable subscription and selector, then the first message can be sent right away without delay. I'd like to get

Message from SQL Server to external application (activemq)

南楼画角 提交于 2019-12-02 12:45:44
问题 I have a SQL Server database and Activemq installed in my system. I tried to create the endpoint to listen to the port where activemq is. The port is 61617 CREATE ENDPOINT InstInitiatorEndpoint STATE = STARTED AS TCP ( LISTENER_PORT = 61617 ) FOR SERVICE_BROKER (AUTHENTICATION = WINDOWS ); GO But it results in an error: The Service Broker endpoint cannot listen for connections due to the following error: '10013(An attempt was made to access a socket in a way forbidden by its access

Apache Camel: Reply received for unknown correlationID

半城伤御伤魂 提交于 2019-12-02 12:36:53
问题 There is a middleware in between of two other software components. In the middleware I'm routing Apache ActiveMQ messages by Apache Camel . this is how it works: 1stComponent uses middleware to send message to the 3rdComponent 3rdComponent replies the message and sends it back to the 1st (using middleware ). 1stComponent <<=>> Middleware <<=>> 3rdComponent Problem: I'm using ConcurrentConsumers in middleware. In the middle of sending a lot of messages sequentially, suddenly middleware stops

解决activeMQ出现activeMQ faild to acquire lock问题

不问归期 提交于 2019-12-02 10:57:01
今天使用spring 整合 activeMQ. 发现出现问题一直报 activeMQ faild to acquire lock, 网上查了一下,原因是:activeMQ的broker在启动时会锁定数据库(activeMQ持久化到了mysql数据库)。我们每个人在调试时,自己的运行环境中就会运行一个broker,所以会出现争用锁的现象(如果只有一个人运行则不会出现这样的问题),报错大体界面如下: 处理办法:在config的activemq.xml中,修改jdbcPersistenceAdapter选项,添加一个:useDatabaseLock="false", <persistenceAdapter> <jdbcPersistenceAdapter dataSource="#mysql-ds" useDatabaseLock="false" /> </persistenceAdapter> 来源: https://blog.csdn.net/a826193310/article/details/102754329

Unable to access ActiveMQ using JMS based code and amqp 1.0

这一生的挚爱 提交于 2019-12-02 10:46:24
I'm trying to connect to an ActiveMQ broker using AMQP 1.0, but I want to use JMS within my application code. I'm interested in using JMS primarily because I want developers to be able to use API's that they are already familiar with. I have ActiveMQ 5.14.0 running on localhost and the following code : public static void main(String[] args) throws JMSException, InterruptedException { Connection connection = null; try { // Producer ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("amqp://localhost:5672"); connection = connectionFactory.createConnection(); connection.start();

How can I call externalApplication based on Activemq message using JMS

天大地大妈咪最大 提交于 2019-12-02 08:53:38
问题 I build 3 Applications,each Application takes more than 20 min for evaluation.I placed 3 files in the following directories ProjectcContextPath/WEB-INF/classes/PackageName/ExternalFileProcess.class ProjectcContextPath/JSPFiles/index.jsp ProjectcContextPath/WEB-INF/classes/AnotherFile.class I want to call these 3 Applications from another Java file name as MessageConsumer.java ,based on message-head.These messages are fetching from Activemq . I don't want to fetch all the messages at a time.

关于Spring bean 注入时有多个候选bean的解决方案

百般思念 提交于 2019-12-02 08:39:53
Error Message org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'javax.jms.ConnectionFactory' available: expected single matching bean but found 2: activeMQConnectionFactory,springFactory 今天使用springboot Demo ActiveMQ过程中,注入 ConnectionFactory 时,SpringBoot 自动配置时发现因为多个候选bean注入失败,解决此问题有两个方法: // 1. 当bean定义阶段和bean注入阶段代码都可以修改时优先采用@Qualifier注解在bean注入阶段解决,使用之前需要先获得bean的名称; @Autowired @Qualifier(value = "activeMQConnectionFactory") public ActiveMQConnectionFactory mqConnectionFactory; @Bean(name = "activeMQConnectionFactory") public ActiveMQConnectionFactory

activeMQ和spring的整合

余生长醉 提交于 2019-12-02 08:12:19
今天分享的是activemq框架和spring框架的整合使用。 (1)导入activemq的核心jar包和整合spring需要的两个jar包 context-support和jms.jar(使用spring的版本是4.2.7 activemq的版本是5.11.2) <!--锁定版本号--> <properties>   <spring.version>4.2.4.RELEASE</spring.version>   <activemq.version>5.11.2</activemq.version> </properties> <!--添加依赖--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> </dependency> <dependency>   <groupId>org.apache.activemq</groupId>   <artifactId>activemq-all</artifactId> <

Install & Configure ActiveMq On Mac

£可爱£侵袭症+ 提交于 2019-12-02 07:58:36
Can anyone assist me with steps to install ActiveMQ on mac. I have downloaded the older ActiveMQ and run command ./activemq start its shows pid file created. But when I try to access localhost:8161 from safari, it does not open. Please suggest. Yes, I have observed this too, what I did was, Go to activemq folder on your machine inside the bin folder and do activemq start or activemq restart , after this the ActiveMQ instance starts correctly and you can access it using URL http://localhost:8161/admin (default location,might be different if you changed the configuration). hope this helps! Good