hornetq

JBoss HornetQ: Set consumer-window-size for slow consumer

怎甘沉沦 提交于 2019-12-08 18:59:37
问题 I want to set the <consumer-window-size/> to 0 . This seems to be the answer of another question ( JMS queue with multiple consumers ), and is described in this article in chapter 17.1.1 . I retrieve the connection factory using JNDI. My hornetq-jms.xml looks like this: <configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd"> <connection-factory name="ConnectionFactory"> <connectors> <connector-ref

JAAS authentication in JMS using WildFly : javax.jms.JMSSecurityException: HQ119032: User: null doesnt have permission=SEND on address {2}

主宰稳场 提交于 2019-12-08 18:14:42
问题 Using WildFly 9.0.2 final, the <hornetq-server> section is defined in standalone-full.xml as follows. Sections like <address-settings> , <acceptors> and <connectors> are completely omitted as I did not change anything in them. <hornetq-server> <security-domain>ProjectRealm</security-domain> <security-enabled>true</security-enabled> <journal-file-size>102400</journal-file-size> <security-settings> <security-setting match="#"> <permission type="send" roles="ROLE_USER ROLE_ADMIN"/> <permission

Wildfly JMS: MDB beans idle when messages exist

孤街醉人 提交于 2019-12-08 04:32:02
问题 I am using the bundled JMS implementation on Wildfly 8.1 (HornetQ) to OCR a large number of documents. I want to have a pool of 3 MDBs consuming the messages of a Queue with the documents to be OCRed. Each MDB starts a process with the Apache commons-exec and blocks until that process exits. In my test I have 50 JMS messages (each represents a document to be OCRed) which are loaded on the Queue at the beginning of the test. When the processing starts, at any given time I can see that there

Pause MDB message Processing

血红的双手。 提交于 2019-12-07 13:16:27
Can we pause the MDB message processing for some time? For example: Jboss 1-deployed MDB for message processing. Jboss 2:-Bean for gathering user details. If the MDB from jboss 1 calls bean in jboss 2 for getting users details. If this is the case, when we restart the Jboss 2, we need to pause the MDB in jboss 1 till the jboss 2 is UP. Is there any option to pause MDB, so that we can avoid failure of message? I doubt you can stop an MDB without stopping the whole application. It is possible with Spring JMS, but not with regular message driven beans. What you could do, and is apparently

How to make a queue persisted in HornetQ 2.2.5 core client?

人盡茶涼 提交于 2019-12-07 04:56:01
问题 I want to make persisted queue in core hornetQ client. The problem is when I stop the server the queue and the data will be destroyed. How to make a queue persisted? My code is: import java.util.Date; import org.hornetq.api.core.TransportConfiguration; import org.hornetq.api.core.client.ClientConsumer; import org.hornetq.api.core.client.ClientMessage; import org.hornetq.api.core.client.ClientProducer; import org.hornetq.api.core.client.ClientSession; import org.hornetq.api.core.client

HornetQ JMSException: Failed to create session factory

风格不统一 提交于 2019-12-07 03:19:27
问题 I'm trying to Directly instantiating JMS Resources without using JNDI to a REMOTE HORNETQ. I am running my test code in Eclipse IDE. Setup my classpath to use the HornetQ 2.2.5 libraries. The target HornetQ is version 2.1.2.Final, I figured they should be backwards compatible, maybe im wrong? Okay, so I have read the online documentation and followed the examples on connecting to a remote JMS server without using JNDI. I keep on getting the following exception. Im not sure what Im missing but

Slow HornetQ Producer when Queue is persistent

自闭症网瘾萝莉.ら 提交于 2019-12-07 02:11:53
问题 I have tried with Persistent Queue in horntQ. I have made two separate examples (Producer, Consumer). My consumer is working well but the Producer is taking too much time to finish sending message. I have run both separately as well as together. What could be the problem? my code is: public class HornetProducer implements Runnable{ Context ic = null; ConnectionFactory cf = null; Connection connection = null; Queue queue = null; Session session = null; MessageProducer publisher = null;

Jboss client send message to remote hornetq in Jboss

半城伤御伤魂 提交于 2019-12-06 19:48:31
I have a client run in JBoss (JB_Client) and it needs to send messages to a remote Jboss server (JB_Server) HornetQ . And Remote jboss server (JB_server) needs to send the response message back to it's HornetQ . So JB_Client MDB is listening to remote HorentQ for the responses. I am using Jboss AS6 for my client and server. This system works perfectly in local environment which is client and server both in same Jboss . But now I need to separate client and server in to two machines. here is my test client configuration. Properties prop = new Properties(); prop.put(Context.INITIAL_CONTEXT

JEE7 + WildFly (HornetQ) - Pause queue from application

半城伤御伤魂 提交于 2019-12-06 10:47:10
问题 We are using WildFly + HornetQ as our application server and JMS message queue, and have the requirement to be able to pause/resume queues from the application. Is this possible? 回答1: This can be done using JMX or using the hornetq core management api. For the purposes of this example, wildfly 8.1.0.Final was used running the standalone-full-ha profile. Required Maven Dependencies: <dependency> <groupId>org.hornetq</groupId> <artifactId>hornetq-jms-client</artifactId> <version>2.4.1.Final<

HornetQ Core API and JMS

狂风中的少年 提交于 2019-12-06 08:57:17
问题 I have few questions regarding HornetQ: What are differences between HornetQ core API and the JMS API ? is there any advantage or disadvantage on using one of these ? Is it true to say if I use the core API and then I decide to change my Messaging Bus (let's say to ActiveMQ) then I have to change all my codes ? 回答1: HornetQ Core API is a proprietary API from HornetQ, while the JMS API is a standard API defined by the Java Community Process. There are a few features that are not supported on