I tried to reduce the test case as much as possible.
I'm sending a message with the following code:
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination destination = session.createTopic("topic_1");
MessageProducer producer = session.createProducer(destination);
TextMessage message = session.createTextMessage("Hello");
producer.send(message);
session.close();
And I'm receiving it with:
Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
Queue subscription = session.createQueue("queue_1");
MessageConsumer consumer = session.createConsumer(subscription);
TextMessage message = (TextMessage) consumer.receiveNoWait();
System.out.println("Message received: " + message.getText());
//message.acknowledge();
session.close();
Note that I commented out the acknowledgement.
So I was expecting the same result if I launch this code twice.
But actually the second time I'm receiving NULL.
Here is the dispatch-router config:
router {
id: router.dell440srv.10104
mode: interior
workerThreads: 4
defaultDistribution: unavailable
}
listener {
host : 0.0.0.0
port: 10104
role: normal
saslMechanisms: ANONYMOUS
requireSsl: no
authenticatePeer: no
}
log {
module: DEFAULT
enable: info+
includeSource: false
outputFile: log/qpid.log
}
connector {
name: broker.dell440srv.5673
host: dell440srv
port: 5673
role: route-container
}
address {
prefix: topic_1
waypoint: yes
distribution: balanced
}
address {
prefix: queue_1
waypoint: yes
distribution: multicast
}
autoLink {
name: broker.dell440srv.5673.topic_1
addr: topic_1
connection: broker.dell440srv.5673
direction: out
}
autoLink {
name: broker.dell440srv.5673.queue_1
addr: queue_1
connection: broker.dell440srv.5673
direction: in
}
-----Original Message-----
From: Gordon Sim <[email protected]>
Sent: lundi 12 novembre 2018 14:16
To: [email protected]
Subject: Re: [Dispatch Router] multicast distribution
On 12/11/18 13:07, VERMEULEN Olivier wrote:
> Hello,
>
> I'm using 1 dispatch-router (1.3.0), 2 brokers (7.0.3) and a simple
> topic/queue configuration.
> I was testing the multicast distribution on the dispatch-router with 1
> producer on the topic and 2 listeners on the queue.
> In AUTO_ACK everything seems to work fine but when I switch to CLIENT_ACK I
> have a strange behavior.
> If I don't acknowledge the message in my listeners I would expect the message
> to go back to the broker (which is what I observed with the balanced
> distribution) but instead the message is just gone...
> Do you know if there is a bug with the multicast distribution? Or did I
> misconfigure something?
I'm not clear on what your configuration is exactly, but multicast distribution
in the router is not end-to-end acknowledged (it can't be, as there may be
multiple receivers). The router that first handles the messages will
acknowledge it to the producer.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional
commands, e-mail: [email protected]
******************************* This e-mail contains information for the
intended recipient only. It may contain proprietary material or confidential
information. If you are not the intended recipient you are not authorized to
distribute, copy or use this e-mail or any attachment to it. Murex cannot
guarantee that it is virus free and accepts no responsibility for any loss or
damage arising from its use. If you have received this e-mail in error please
notify immediately the sender and delete the original email received, any
attachments and all copies from your system.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]