jms-topic

How to create durable subscription to ibm mq amqp topic from java program?

你。 提交于 2021-01-20 12:36:28
问题 We have programmatically created subscriber to IBM MQ AMQP TOPIC with createDurableSubscriber by providing clientId and subscriber name. We start the program so it subscribes to TOPIC and stop the program. Then send the msgs to topic and again start the receiver program again but we cannot receive the msgs sent and loose the messages which should not happen in case of durable subscription.. We can see amqp topic and its durable subscription when subscriber is connected using mqsc commands

Consume message only once from Topic per listeners running in cluster

丶灬走出姿态 提交于 2019-12-25 07:46:29
问题 I'm implementing an Domain Event infrastructure, but the project doesn't allow any messaging infra(financial services client) so found an alternative in Hazelcast Topics and ExecutorService, But the problem is when running in cluster the message shall be delivered to listeners which is going to be running in cluster, so for a cluster of 2, we have same listener running in 2 jvm, and message consume twice and acted upon, suppose the Domain event is supposed to perform some non idempotent

JMS 2.0 - How to receive messages from topic with shared consumers?

偶尔善良 提交于 2019-12-24 21:05:12
问题 I am using ActiveMQ Artemis and JMS 2.0 for reading topic messages with shared consumers. I have two questions: Is there any way to use configuration with xml format. When I set the message listener on the consumer is it mandatory to use a while loop? If I don't use while (true) loop the program will terminate when topic has no messages. SharedConsumer.java public class SharedConsumer { @Resource(lookup = "java:comp/DefaultJMSConnectionFactory") ConnectionFactory connectionFactory; public

How can I do a Storm spout that listen an ActiveMQ topic?

烈酒焚心 提交于 2019-12-24 03:20:49
问题 I programmed a Storm topology that listens on particular topic on kafka with its spouts. Now I have to migrate it on activeMQ. Is possible to reproduce these topics with activeMQ and create spouts that listen them as I did with kafka? I googled it, but it is not clear how I can send a message to a topic or listen a particular topic. In kafka a do something like data = new KeyedMessage<>("topic", sms); producer.send(data); to send sms on topic and just create a new kafkaspout("topic") to

How can I do a Storm spout that listen an ActiveMQ topic?

非 Y 不嫁゛ 提交于 2019-12-24 03:20:04
问题 I programmed a Storm topology that listens on particular topic on kafka with its spouts. Now I have to migrate it on activeMQ. Is possible to reproduce these topics with activeMQ and create spouts that listen them as I did with kafka? I googled it, but it is not clear how I can send a message to a topic or listen a particular topic. In kafka a do something like data = new KeyedMessage<>("topic", sms); producer.send(data); to send sms on topic and just create a new kafkaspout("topic") to

How to share messages, published on Topic, between multiple VMs, in Spring Jms Tibjms

久未见 提交于 2019-12-19 04:13:08
问题 My application is consuming messages published to a Topic. I have 3 servers where my application code is running. With current implementation, the messages is distributed to all running VMs i.e. copy of message is received by every consumer. My requirement is that every consumer should receive distinct message i.e. no two consumer should get same message. Below are the libraries I am using: spring jms 4.2.7 Java jms 2.0 tibco jms 8.0 wildfly-swarm as server Currently I have following

How to detect loss of JMS Topic connection

江枫思渺然 提交于 2019-12-13 06:27:58
问题 We have swing GUI clients that are connecting to a server process. The clients 'call' services on the server using jms:queue 'from' endpoints defined in Camel routes, and using ActiveMQ as the underlying JMS broker. However, the client also offers a Camel jms:topic endpoint for the server to broadcast messages back to the client. Unfortunately, it looks like the topic connection is getting lost somehow, and although the client can still 'call' the services on the server, the server cannot

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

JMSTemplate with multiple brokers. Destination resolving exception

被刻印的时光 ゝ 提交于 2019-12-11 17:03:24
问题 I have problem which I am trying solve all day, without success... I have an application which trying to send/receive messages to/from external system A and external system B. A and B it is WLS based external systems. While my application is coming up - i am reading all configurations and building my applicational JMSProducer and injecting JMSTemlate with predefined destination name in it. Here is my code: private JMSProducer initProducer(Conf conf) { DestinationResolver destinationResolver =

How does spring jms distribute messages among durable topic listeners?

自闭症网瘾萝莉.ら 提交于 2019-12-11 10:57:25
问题 raw jms code: TopicSubscriber durSubscriber1 = receiverSession.createDurableSubscriber(topic,"subscription_1"); durSubscriber1.setMessageListener(new MessageListener() { @Override public void onMessage(Message message) { RMQTextMessage rmqTextMessage = ((RMQTextMessage) message); try { System.out.println("sub_1:" + rmqTextMessage.getText()); } catch (JMSException e) { e.printStackTrace(); } } }); TopicSubscriber durSubscriber2 = receiverSession.createDurableSubscriber(topic,"subscription_2");