hornetq

force order of messages with HornetQ

雨燕双飞 提交于 2019-12-12 10:36:23
问题 I've setup a jms server with HornetQ as a JMS provider (Queue). I have an application which acts as a producer and another one (different computer) as a consumer. I understand that the JMS specification doesn't guarantee the order of delivery, but I'm looking for a way to do just that: receive the messages exactly in the order they have been sent, even if it's provider specific. Any ideas? 回答1: Apparently this can be achieved by disabling the consumer cache. This is done by changing the

NameNotFoundException when starting JBoss with an EAR using HornetQ ConnectionFactory via JNDI using Spring JMS

自古美人都是妖i 提交于 2019-12-12 03:21:50
问题 I'm trying to deploy an application (EAR) which has Spring JMS listeners, BlazeDS flex and HornetQ in Jboss EAP 6.2.4. When I deploy the application and try to start the server, I'm getting the below exception. Caused by: javax.naming.NameNotFoundException: JmsXA -- service jboss.naming.context.java.JmsXA at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197) at org.jboss.as.naming

How to upgrade embedded HornetQ on JBoss 6.1.0.Final

谁说我不能喝 提交于 2019-12-12 02:58:37
问题 I am running JBoss 6.1.0.Final with embedded HornetQ. I want to upgrade HornetQ but keep the JBoss. Is that possible, and how? What would the latest compatible HornetQ version that can still work with JBoss 6.1.0Final? Looking at this thread: How to upgrade HornetQ version in JBoss 6? I tried the following: 1- Download HornetQ 2.4.0, but wasn't sure what copy from the pack? 2- Download the latest JBoss AS 6.1.1Final and copies some jars, but not sure what version I deployed. I need at least

HornetQ JMS Topic To Topic Bridge

夙愿已清 提交于 2019-12-12 00:43:25
问题 I'm trying to set up a bridge between two topics. The idea is this: A notification gets posted to a topic on HornetQ server A This notification gets sent to a topic on HornetQ server B (over a bridge?) The client app gets the notification from server B. The reason I need to do this is, if server B is down, we still want the topic up and eventually delivered to the subscribing servers. What I need is an example hornetq-configuration.xml and hornetq-jms.xml demonstrating this. Or am I looking

Streaming using camel JMS

安稳与你 提交于 2019-12-11 06:48:33
问题 I have a application which places message in JMS Queue.The message size can be upto 150 mb. JMS message contains byte array data with additional metadata as xml,once the message is placed in queue the camel route application picks the message and calls the external java api with the message.i would like to stream the message from the JMS Queue using camel jms component. Can you please tell me if i can acheive it using camel. Currently i am facing heap error issue. Sample JMS message is as

Confirm that a message reached the queue

徘徊边缘 提交于 2019-12-11 05:27:32
问题 I am using org.hornetq.api.core.client how to confirm that sending a message using producer.send("validQueue",clientMessage) was successful and did reached the queue ? trying sending to invalid queue i.e producer.send("NoneExistingQueue",clientMessage) did not throw hornetQException as I expected. 回答1: With core api we allow users to do pure publish subscribe. Not having an address registered means you don't have someone connected to that particular address (i.e. not interested.. on that case

HornetQ does not persist messages after restart

早过忘川 提交于 2019-12-11 02:07:50
问题 I am using HornetQ as a queue provider as it has persistence capabilities. However, after I restart the application, all the messages in the queue are lost. Maybe configuration issues? Here is the code: // Step 1. Create the Configuration, and set the properties accordingly Configuration configuration = new ConfigurationImpl(); configuration.setPersistenceEnabled(true); configuration.setPersistIDCache(true); configuration.setJMXManagementEnabled(true); configuration.setMessageCounterEnabled

Should I or shouldn't I use the CachingConnectionFactory with hornetq 2.4.1

浪子不回头ぞ 提交于 2019-12-11 00:55:18
问题 Based on long standing information about using the JMSTemplate with hornetq we have been using the CachingConnectionFactory when connecting to the server. Here is an example configuration, very similar to one that we are using: <bean id="jmsConnectionFactory" class="org.hornetq.jms.client.HornetQJMSConnectionFactory"> <constructor-arg name="ha"> <value>false</value> </constructor-arg> <constructor-arg name="initialConnectors"> <bean class="org.hornetq.api.core.TransportConfiguration">

JMS 2.0 QueueBrowser on Wildfly does not return messages

谁说胖子不能爱 提交于 2019-12-10 10:54:49
问题 I have 2 simple EJB beans. The first one is a timer method that is called every second. In this method I add 10 random messages to a TestQueue. @Singleton @Startup public class Timer { @Inject private JMSContext context; @Resource(mappedName = "java:/jms/queue/TestQueue") private Queue queue; @Schedule(hour = "*", minute = "*", second = "*/1", persistent = false) @AccessTimeout(unit = TimeUnit.DAYS, value = 1) public void addToQueue() { for(int i = 0; i<30; i++) context.createProducer().send

Are multiple client consumers possible in hornetq?

只愿长相守 提交于 2019-12-09 01:26:07
问题 In my client application, I create several consumers, but they can't concurrently process the queue. Always, only a single consumer processes the queue messages. I don't know why. Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); env.put(Context.PROVIDER_URL, "192.168.1.111:1099"); InitialContext ctx = new InitialContext