activemq

Implement Request-Reply pattern using ActiveMQ, Camel and Spring

我怕爱的太早我们不能终老 提交于 2019-12-21 12:39:56
问题 I am trying to implement the following functionality: Read CSV file line-by-line then for every line: Build request based on the values that the line contains Send the request to the message queue Other component needs to pick up the message, process the request and send the response to another message queue (known to producer, so the producer could pick up the response). I believe that the request-reply pattern fits the bill. I installed ActiveMQ, downloaded camel and tried to use their jms

JMS message priority not working on Message

余生长醉 提交于 2019-12-21 07:08:28
问题 I need to set message priority so that High priority messages are consumed before Low priority messages by Receivers. First I tried with message.setJMSPriority() method to set the priority but it was not working in HornetQ and ActiveMQ so finally I set the priority of the Message Producer using setPriority() method and it works fine now. Why isn't Messsge.setJMSPriority() working in any of the JMS vendor implementations and why do we need to set the priority of the Producer not the message

Processing multiple message in parallel with ActiveMQ

梦想与她 提交于 2019-12-21 05:34:10
问题 I'd like to process messages in a queue in parallel using a simple Processor/AsyncProcessor as a destination. The processor takes a little time per message, but each message can be handled seperately, and thus at the same time (within healthy boundaries). I'm having a hard time finding examples, especially about the xml configuration of camel routes. So far, I've defined a threadpool, route and processor: <threadPool id="smallPool" threadName="MyProcessorThread" poolSize="5" maxPoolSize="50"

How to enable web console on ActiveMq embedded broker

这一生的挚爱 提交于 2019-12-21 05:12:10
问题 I've configured an ActiveMQ 5.8.0 embedded broker using Spring 3.2.5 This is my jmsconfiguration.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <amq

Spring configuration for multiple Activemq remote brokers

天涯浪子 提交于 2019-12-21 04:18:19
问题 How to configure multiple remote activemq brokers (different IP address) in spring context? Below is the configuration for 1 remote broker. I am using camel to create routes that produce and consume messages from and to different queues in multiple remote brokers. Based on the following routes, how do the system knows which remote broker each queue belongs to? List item from("direct:start").to("activemq:queue:outgoingRequests") List item from("activemq:queue:incomingOrders").to("log:Events?

Using JMS or ThreadPool to send email messages

烈酒焚心 提交于 2019-12-21 02:40:15
问题 I will like to know: I have a scenario. If a user adds a product to the system (I'm developing), there's a listener that sends a notification to the user's client base notifying of a new product added by the user. I've read this thread and (seeing I've never used JMS nor ThreadPool before) I was wondering whether I should use JMS or ThreadPooling. I am using Tomcat 5.5 and higher and JBoss 5 and higher (depending on company last resort) to deploy my web application. If I use JMS, do I use

How to simulate message redelivery in AUTO_ACKNOWLEDGE JMS Session Scenario?

故事扮演 提交于 2019-12-21 01:19:35
问题 In the following test I'm trying to simulate the following scenario: A message queue is started. A consumer designed to fail during message processing is started. A message is produced. The consumer starts processing the message. During processing an exception is thrown to simulate message processing failure. The failing consumer is stopped. Another consumer is started with the intent to pick up the redelivered message. But my test fails and the message is not redelivered to the new consumer.

消息队列activemq

柔情痞子 提交于 2019-12-20 17:14:12
消息队列activemq 首先,我们为什么需要消息队列? 其实就是问问你消息队列都有哪些使用场景,然后你项目里具体是什么场景,说说你在这个场景里用消息队列是什么? 面试官问你这个问题,期望的一个回答是说,你们公司有个什么业务场景,这个业务场景有个什么技术挑战,如果不用MQ可能会很麻烦,但是你现在用了MQ之后带给了你很多的好处! 先说一下消息队列的常见使用场景吧,其实场景有很多,但是比较核心的有3个:解耦、异步、削峰 1.解耦:现场画个图来说明一下 A系统发送个数据到BCD三个系统,接口调用发送,那如果E系统也要这个数据呢?那如果C系统现在不需要了呢?现在A系统又要发送第二种数据了呢?A系统负责人濒临崩溃中。。。再来点更加崩溃的事儿,A系统要时时刻刻考虑BCDE四个系统如果挂了咋办?我要不要重发?我要不要把消息存起来?头发都白了啊。。。 面试技巧 :你需要去考虑一下你负责的系统中是否有类似的场景,就是一个系统或者一个模块,调用了多个系统或者模块,互相之间的调用很复杂,维护起来很麻烦。但是其实这个调用是不需要直接同步调用接口的,如果用MQ给他异步化解耦,也是可以的,你就需要去考虑在你的项目里,是不是可以运用这个MQ去进行系统的解耦。在简历中体现出来这块东西,用MQ作解耦。 2.异步:现场画个图来说明一下, A系统接收一个请求,需要在自己本地写库,还需要在BCD三个系统写库

MongoDB Schema Design - Real-time Chat

余生长醉 提交于 2019-12-20 08:49:53
问题 I'm starting a project which I think will be particularly suited to MongoDB due to the speed and scalability it affords. The module I'm currently interested in is to do with real-time chat. If I was to do this in a traditional RDBMS I'd split it out into: Channel (A channel has many users) User (A user has one channel but many messages) Message (A message has a user) The the purpose of this use case, I'd like to assume that there will be typically 5 channels active at one time, each handling

What is an MQ and why do I want to use it?

删除回忆录丶 提交于 2019-12-20 08:28:02
问题 On my team at work, we use the IBM MQ technology a lot for cross-application communication. I've seen lately on Hacker News and other places about other MQ technologies like RabbitMQ. I have a basic understanding of what it is (a commonly checked area to put and get messages), but what I want to know what exactly is it good at? How will I know where I want to use it and when? Why not just stick with more rudimentary forms of interprocess messaging? 回答1: All the explanations so far are