jms

How can I allow multiple @JmsListener destinations for a single method

↘锁芯ラ 提交于 2020-07-23 09:47:05
问题 I'm currently working on migrating an IBM Webshere application to Spring Boot. As part of this there is an MDB class which needs to be converted into @JmsListener . This MDB has a single method that is listening to multiple queues. I would like to do the same using @JmsListener with multiple destinations. I saw this thread, but that's not working. This is the current MDB Configuration : Bean 1 <bean id="myAppabcResponseMDB" class="company.myApp.service.mdb.MyAppMessageListenerMDB"/> <bean id=

Unable to send message to remote ActiveMQ Artemis embedded in JBoss EAP 7.2

北城以北 提交于 2020-07-22 08:34:26
问题 I am trying to send a JMS message to remote ActiveMQ Artemis queue that is embedded in JBoss EAP 7.2. I have defined the following in standalone-full.xml : Remote Connector Pooled Connection Factory Remote binding <subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0"> <server name="default"> <journal pool-files="10"/> <security-setting name="#"> <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/> </security-setting> <address

Where to change prefetch value in activemq

此生再无相见时 提交于 2020-07-08 05:58:57
问题 I read documentation about prefetch buffer .As per my understanding If I assign Prefetch value =1 to consumer A. Activemq push 1 message at a time to A .once A sends acknowledgement to activemq,then only activemq push another message to A. My doubt was,where I need to assign prefetch value to consumer. Am I need to assign prefetch value in consumer program.If it is right,can you explain with simple code. Thanks. 回答1: As per the ActiveMQ manual: ActiveMQ uses a prefetch limit on how many

Where to change prefetch value in activemq

早过忘川 提交于 2020-07-08 05:58:21
问题 I read documentation about prefetch buffer .As per my understanding If I assign Prefetch value =1 to consumer A. Activemq push 1 message at a time to A .once A sends acknowledgement to activemq,then only activemq push another message to A. My doubt was,where I need to assign prefetch value to consumer. Am I need to assign prefetch value in consumer program.If it is right,can you explain with simple code. Thanks. 回答1: As per the ActiveMQ manual: ActiveMQ uses a prefetch limit on how many

ActiveMQ Artemis broadcast sending messages to only one server in the group

試著忘記壹切 提交于 2020-06-29 03:57:26
问题 I am new to Artemis. I have two artemis server up and running but when I send broadcast messages then the messages are sent to only one server. Following is the snippet of broker.xml of brokerOne <!-- Acceptor for every supported protocol --> <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection

JMS ExceptionListener

浪尽此生 提交于 2020-06-25 06:05:18
问题 I am using javax.jms.Connection to send and receive JMS messages to/from JBoss501. I am also using the Connection.setExceptionListener() . I would like to know if the exception listener needs to be set before the connection is started by Connection.start() ? Any ideas to reproduce the JBoss connection exception at will to confirm if the exception listener is invoked. 回答1: From the spec: If a JMS provider detects a serious problem with a Connection object, it informs the Connection object's

ConnectionPool: pool is empty - increase either maxPoolSize or borrowConnectionTimeout

徘徊边缘 提交于 2020-06-17 09:43:14
问题 I was facing this issue for my springboot application that connects to a DB and MQ, and uses Atomikos Transaction manager. com.atomikos.jms.AtomikosJMSException|Connection pool exhausted - try increasing 'maxPoolSize' and/or 'borrowConnectionTimeout' on the AtomikosConnectionFactoryBean. com.atomikos.datasource.pool.PoolExhaustedException: ConnectionPool: pool is empty - increase either maxPoolSize or borrowConnectionTimeout at com.atomikos.datasource.pool.ConnectionPool

How to remove default Spring JMS Template headers when sending a message to an MQ?

冷暖自知 提交于 2020-06-16 08:51:37
问题 Using Java/Spring to interact with a WebSphere MQ and trying to send a message to it, Spring keeps adding the following header information to it: RFH Ì ¸MQSTR ¸ <mcd><Msd>jms_text</Msd></mcd> <jms><Dst>queue:///MY.QUEUE.INFORMATION.TEST</Dst><Rto>queue:///MY.QUEUE.INFORMATION.TEST</Rto><Tms>123456789</Tms><Dlv>2</Dlv></jms>BEGINNING_OF_MY_PAYLOAD How would I remove everything and only send my payload? One could refer to my payload in the snippet above as BEGINNING_OF_MY_PAYLOAD . Here's the

Spring JMS : Set ErrorHandler for @JmsListener annotated method

ⅰ亾dé卋堺 提交于 2020-05-26 11:27:54
问题 I am using a @JmsListener annotated method listen to JMS messages as shown below. @JmsListener(destination="exampleQueue") public void fetch(@Payload String message){ process(message); } When this method execution result in an exception, I got a warn log Execution of JMS message listener failed, and no ErrorHandler has been set. How do I set an ErrorHandler to handle the case. I am using spring boot 1.3.3.RELEASE 回答1: While using annotations like @EnableJms , @JmsListener etc to work with

Spring JMS : Set ErrorHandler for @JmsListener annotated method

家住魔仙堡 提交于 2020-05-26 11:27:45
问题 I am using a @JmsListener annotated method listen to JMS messages as shown below. @JmsListener(destination="exampleQueue") public void fetch(@Payload String message){ process(message); } When this method execution result in an exception, I got a warn log Execution of JMS message listener failed, and no ErrorHandler has been set. How do I set an ErrorHandler to handle the case. I am using spring boot 1.3.3.RELEASE 回答1: While using annotations like @EnableJms , @JmsListener etc to work with