spring-jms

How to send text message instead of byte message

泄露秘密 提交于 2019-12-13 20:00:27
问题 I am building a camel route using blueprint.xml that talks to my JMS queue. I have been getting mysterious errors where my spring boot app that acts as a consumer for my queue is sending my xml as a byte message instead of text message and the Spring consumer chokes on this. Here are the two messages, the text one works: 2016-06-24 07:08:22,671 | INFO | Sending message: ActiveMQBytesMessage {commandId = 8, responseRequired = true, messageId = ID:ThomasLaptop-54711-1466766502054-1:1:2:1:1,

IBM Websphere MQ - EJB and MDB migration for Tomcat deployment

大城市里の小女人 提交于 2019-12-13 16:07:37
问题 I have been struggling with this for a long time now. I have an IBM Websphere MQ, which uses EJB and MDB The following is where the ejb mdb is configured. <?xml version="1.0" encoding="UTF-8"?> <ejb-jar-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://websphere.ibm.com/xml/ns/javaee" xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd" version="1.0"> <message-driven name="Queue1MDB"> <jca-adapter

JMS / ActiveMQ: Sending an object with objects as class members

狂风中的少年 提交于 2019-12-13 05:50:34
问题 I'm using ActiveMQ (with Spring) for sending messages to remote OSGi-Container. This works very fine, but there is one issue. I got two classes implementing Serializable. One class is the class member of the other class, like this: public class Member implements Serializble { private int someValue; private static final long serialVersionUID = -4329617004242031635L; ... } public class Parent implements Serializable { private static final long serialVersionUID = -667242031635L; private double

Spring, jms lost context

大憨熊 提交于 2019-12-13 04:42:20
问题 i'm writing webapp that uses few workers. I decide to use JMS ActiveMQ to communication between them. My problem is that when i change workers configuration to java (when config was in xml i couldn't run jar) i have problem when message returns to webapp : 2013-07-19 21:23:23.653 [org.springframework.jms.listener.DefaultMessageListenerContainer#4-3] WARN o.s.j.l.DefaultMessageListenerContainer - Execution of JMS message listener failed, and no ErrorHandler has been set. java.lang

Multiple listeners that are durable. Do they work concurrently?

左心房为你撑大大i 提交于 2019-12-13 04:16:49
问题 My configuration: @Bean public ActiveMQConnectionFactory connectionFactory(){ ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(); connectionFactory.setBrokerURL(DEFAULT_BROKER_URL); return connectionFactory; } @Bean public DefaultMessageListenerContainer listenerContainers() { DefaultMessageListenerContainer container = new DefaultMessageListenerContainer(); container.setConnectionFactory(connectionFactory()); //container.setConnectionFactory(connectionFactory1());

Java: how to unsubscribe a durable subscriber from Spring's DMLC?

断了今生、忘了曾经 提交于 2019-12-13 02:45:18
问题 In plain JMS we can do: session.unsubscribe("name of the durable subscription"); but how do we do it through DMLC? Couldn't find any specific method for this purpose in it. 回答1: To my knowledge, there is no Spring specific way of sending an "unsubscribe" command to the MQ server, however you always have the option of obtaining an underlying JMS Session by extending the DefaultMessageListenerContainer class and calling getSession() or createSession(). After all Spring is just a convenient

Spring's DefaultMessageListenerContainer to use connection factory directly from broker or JCA managed?

一笑奈何 提交于 2019-12-13 01:48:01
问题 I have a Spring Integration application, where I have a JMS inbound channel adapter that will receive messages from a queue in a remote JMS broker. I'm looking up the connection factory directly from the broker's remote JNDI service and this is what I use to set up my inbound channel adapter. I understand that behind the scenes there is a DefaultMessageListenerContainer . According to AbstractMessageListenerContainer javadocs, found here, if "sessionTransacted" is set to "true" for the DMLC,

How to rollback message taken from IBM MQ in spring integration

非 Y 不嫁゛ 提交于 2019-12-13 01:32:00
问题 I have a spring integration flow like this: 1) message-driven-channel-adapter -> 1.1) output-channel connected to -> service-activator -> outbound-channel-adapter (for sending response) 1.2) error-channel connected to -> exception-type-router 1.2.1) message is sent to different queues depending on the exception type using outbound-channel-adapter I have set acknowledge="transacted" in message-driven-channel-adapter. I want to introduce rollback for a specific type of exception, after error

Notify ActiveMQ producer if consumer on the destination is down

百般思念 提交于 2019-12-12 19:09:02
问题 I am using ActiveMQ messaging broker and I have a requirement where the producer application would want to know if the consumer application consuming on the particular destination is up or not? How can I achieve this? Thanks! 回答1: You should checkout Advisory messages. It's a topic you can subscribe to if you want updates on such events. Specifically the topic: ActiveMQ.Advisory.NoConsumer.Queue should be of interest. You need to enable it broker side though using the destination policy

Sending message to Weblogic JMS Queue from a Camel Route

故事扮演 提交于 2019-12-12 14:11:17
问题 I am trying to put a message on a Queue in Weblogic JMS, via a Camel Route. My aim is to eventually configure a Route to consume the messages from the jms queue to which I publish the data from the earlier Route. Here is my config: <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop> <prop key="java.naming.provider.url">t3://localhost:7001</prop> <!--